On Aug 31, 2010, at 11:58 PM, Donald Winston wrote:

int year = Calendar.getInstance().get(Calendar.YEAR);

But you have to use static methods. Jess doesn't appear to let you do this.



Sure it does! Two different ways to write this:


1)

(import java.util.Calendar)
(bind ?year ((Calendar.getInstance) get (Calendar.YEAR)))

2)

(import java.util.Calendar)
(bind ?year ((call Calendar getInstance) get (get-member Calendar YEAR)))


---------------------------------------------------------
Ernest Friedman-Hill
Informatics & Decision Sciences          Phone: (925) 294-2154
Sandia National Labs
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