Two minor things wrong:
I think Vincent Wolowski wrote:
[Charset iso-8859-1 unsupported, filtering to ASCII...]
> Hi all,
>
> what4s wrong with the following code?
>
> (defglobal ?*xxx* = 12)
...
> (if(floatp(?*xxx*))
Too many parentheses here: should be (if (floatp ?*xxx*).
Parentheses are used only to delimit lists. A fact is a list, a
function call is a list, a defrule is a list, etc. But the arguments
to a a function call are not a list by themselves; they're part of the
list that includes the function name.
Jess's error message for this starts with:
Jess reported an error in routine ValueVector.get
while executing (call ?*xxx*)
while executing (floatp (call ?*xxx*))
Jess has interpreted (?*xxx*) as (call ?*xxx*) -- i.e., Jess is trying
to interpret the list (?*xxx*) as a function call.
The other error (if it is an error, I'm not sure) is that floatp
returns FALSE for 12, which is an INTEGER, not a FLOAT. You can use
the (numberp) function to test for is/is not a number.
---------------------------------------------------------
Ernest Friedman-Hill
Distributed Systems Research Phone: (925) 294-2154
Sandia National Labs FAX: (925) 294-2234
Org. 8920, MS 9012 [EMAIL PROTECTED]
PO Box 969 http://herzberg.ca.sandia.gov
Livermore, CA 94550
--------------------------------------------------------------------
To unsubscribe, send the words 'unsubscribe jess-users [EMAIL PROTECTED]'
in the BODY of a message to [EMAIL PROTECTED], NOT to the list
(use your own address!) List problems? Notify [EMAIL PROTECTED]
--------------------------------------------------------------------