I think Peter Martinovic wrote:
> hi,
> 
> please, is it possible to use constants in jess ? i did not find any notice of this 
>in the docs.
> 
> would there be a way of using e.g a static java class members for this purpose ? 
>would i have to write the set and get methods for them ?
> 
> thank you


I tend to use defglobals as "constants", even though they're mutable
(idea for future Jess version: "final" defglobals?)

You can access static members in any Java class using get-member:

Jess> (import java.awt.AWTEvent)
TRUE
Jess> (printout t (get-member AWTEvent COMPONENT_EVENT_MASK) crlf)
1
Jess>


> 
> peter
> 
> (sorry for bothering everyone if this is an elementary question)



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

Reply via email to