OK thanks Ernest for your help!
On Wed, 19 Aug 2009, Ernest Friedman-Hill wrote: > Yes, as I said, it would be > > (calling goToSlide "TEST" (+ ? slide 1)) > > On Aug 19, 2009, at 4:43 AM, John Chrysakis wrote: > > > > > Hi, > > > > I used: (calling goToSlide "TEST" + ? slide 1) > > > > but I am getting: > > > > Jess reported an error in routine Value.intValue > > while executing (calling goToSlide + ?slide 1) > > while executing defrule MAIN::SettingStateAccordingToRoom-rule1. > > Message: '+' is a symbol, not an integer. > > > > ... > > On Tue, 18 Aug 2009, Ernest Friedman-Hill wrote: > > > >> In Jess, parentheses always have special meaning; most of the time, > >> they mean "this is a function call". So (?slide) would mean "call > >> what's in ?slide as a function", which is definitely not what you > >> want. The "+" function, like all Jess functions, is called using > >> prefix notation; the quantity "three more than ?slide" is written > >> (+ ? > >> slide 3) . > >> > >> > >> > >> On Aug 18, 2009, at 9:24 AM, John Chrysakis wrote: > >> > >>> > >>> Hello to all community, > >>> > >>> I am trying to bind an int variable e.g slide > >>> and then to use it's value plus a different number, > >>> > >>> e.g slide + 2, slide +3. > >>> > >>> How I Can Do that, the following doesn't work. > >>> > >>> > >>> (defrule Rule1 > >>> ... > >>> => > >>> (bind ?slide 4) > >>> (calling goToSlide "p1" ?slide) > >>> (calling goToSlide "p2" ((?slide)+1)) > >>> (calling goToSlide "p3" ((?slide)+6)) > >>> ... > >>> ) > >>> > >>> > >>> thank you in advance! > >>> > >>> > >>> -------------------------------------------------------------------- > >>> 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] > >>> . > >>> -------------------------------------------------------------------- > >> > >> --------------------------------------------------------- > >> 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] > >> . > >> -------------------------------------------------------------------- > >> > >> > > > > > > -------------------------------------------------------------------- > > 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] > > . > > -------------------------------------------------------------------- > > --------------------------------------------------------- > Ernest Friedman-Hill > Informatics & Decision Sciences, Sandia National Laboratories > PO Box 969, MS 9012, 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]. > -------------------------------------------------------------------- > > -------------------------------------------------------------------- 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]. --------------------------------------------------------------------
