I think Noah Zimmerman wrote: > ( deftemplate lane-segment extends line > ( slot startX ) ( slot startY ) > ( slot endX ) ( slot endY ) > ( slot numLanes ) ( slot type )) > > ( deffunction in-lane-segment ( ?lane-segment ) > > Now, from within the function in-lane-segment, I would like to access > the slot numLanes from the lane-segment template. >
I'm not 100% sure you really mean "template" here; you may be wanting to pass a fact to this function, and access the contents of the numLanes slot in that fact. You can use the fact-slot-value function to do this (see function list in manual.) If you really mean you're passing a deftemplate to a function as an argument, then it's likely you mean a reference to a jess.Deftemplate object; in which case, you can work with it using Jess's reflection capabilities and that class's API. If this doesn't make sense, then you might expand on your example a little so we can see what you're trying to do. --------------------------------------------------------- Ernest Friedman-Hill Distributed Systems Research Phone: (925) 294-2154 Sandia National Labs FAX: (925) 294-2234 PO Box 969, MS 9012 [EMAIL PROTECTED] Livermore, CA 94550 http://herzberg.ca.sandia.gov -------------------------------------------------------------------- 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] --------------------------------------------------------------------
