Purpose | The <eval> statement is used to perform calculations via its <expr> clause. | |||||||||
Format |
<eval> <parm type="{parm type}" name="{parm name}"> {parm value} </parm> <expr> {expression} </expr> <eval> {parm type} |
(optional) the datatype of the parameter to be substituted into the {expression} |
{parm name} |
(optional) the name of the parameter to be substituted into the {expression} |
{parm value} |
(optional) the value of the parameter to be substituted into the {expression} |
{expression} |
an expression that can be calculated. It may contain mathematical operators and calculation functions. |
|
|
Example #1 |
<eval> <expr>5 + 6</expr> </eval> yields 11 |
|||||||||
Example #2 |
<eval> <parm type="string" name="a">atom</parm> <expr>len(a) < 5</expr> </eval> yields true |
|||||||||
Example #3 |
<eval> <parm type="string" name="a">atom</parm> <expr>(len(a) + 5) < 5</expr> </eval> yields false |