var xx = 1 // a global, can be seen in all rules (in this rules file)
// but not by rules in other files
rule xxx
...
then
var zz = 1 // only accessible in the context of this rule
...
createTimer( ... [ |
// code executed here is in global context
// globals cannot 'see' each other
// code cannot see 'xx'
// nor can code see 'zz' which was in rule context
])
end
I think you are beginning to run into the difficulties described in Rik’s post below, in particular
“lambdas do not have access to the global vals and vars in their context so all of those must be passed as arguments.”