Goto main content

evaluation

variables and codes.

EVALUATION

NAME

evaluation - variables and codes.

SYNOPSIS

evaluation $variable or ${code….} codes @variable or @{code…}

DESCRIPTION

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.

EXAMPLES

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.

SEE ALSO

AUTHOR

Written by Pierre Laplante and Caroline Laplante, <laplante@sednove.com>

MODIFICATIONS

1.0 2014-09-09 21:24:14 laplante@sednove.com

Edit

© 2024 extenso Inc. All rights reserved.