evaluation - variables and codes.
evaluation $variable or ${code….} codes @variable or @{code…}
The evaluation is used to parser a portion of code from a variable or from the enclosing brackets.
When used as a variable in the form $variable, the content of the variable is parse * execute as a variable. If a contains b, then $a returns the content of b. In the second form, ${a; b;} the output of the enclosing bracket is evaluated as a variable. In this case, the variable ab is returned.
When used as a code, the code in the variable or in the enclosing brackets is evaluated and returned.
Note: In the followings examples, the _ between the { should be removed to make it work.
res={_{a="if 1 > 0 then 'oui'; else 'non'; endif"; @a;}}. return res=oui. res={_{@{if 1 > 5 then 'oui'; else 'non'; endif}; }}. return res=non. res={_{a=5; b="a"; $b;}}.return res=5. res={_{xml.a4="vala";xml.ctx="xml";xml.vala="pierre"; ${"xml.";${xml.ctx;".a";2*2}}}}. return res=pierre.
Written by Pierre Laplante and Caroline Laplante, <laplante@sednove.com>
Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin commodo. Cras purus odio, vestibulum in vulputate at, tempus viverra turpis.
1.0 2014-09-09 21:24:14 laplante@sednove.com