On Oct 13, 2007, at 1:14 AM, ameng wrote:


Hello,

In Jess document for fetch and restore:

r.store("DIMENSION", new java.awt.Dimension(10, 10));
r.eval("(bind ?list (list dimension (fetch DIMENSION)))");
r.eval("(printout t ?list)");

In the second line, what is the "dimension" for between list and (fetch,
cast to Demension type?

No, there's no casting in Jess. The example is just using the result of "fetch" as an argument to the "list" function, then binding that to a variable. The result of the call to "list" is a Jess list of two elements: the symbol "dimension", and a Dimension object. There's no special reason why the example does this -- it's just something you might want to do.


---------------------------------------------------------
Ernest Friedman-Hill
Informatics & Decision Sciences          Phone: (925) 294-2154
Sandia National Labs                FAX:   (925) 294-2234
PO Box 969, MS 9012                 [EMAIL PROTECTED]
Livermore, CA 94550                 http://www.jessrules.com

--------------------------------------------------------------------
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]
--------------------------------------------------------------------

Reply via email to