...
do(expression1, expression2[,..., expressionN])
Argument | Type | Description |
---|---|---|
expressionN | Expression | Any valid Expression |
Note that if a break() or continue() function is used within the do() then the do() function returns immediately and since it has not reached the last expression in the list a _NULL value will be returned.
Examples
Code Block |
---|
do(
//evaluate an expression
$number = 1,
//and then evaluate another expression
$word = "Word"
) |
This whole do() block evaluates to the value of the last expression: "Word"
Note that $number and $word are still available after the do() statement has been concluded.
Code Block |
---|
do(
$difference = crm.total - billing.total,
if( $difference != 0,
addElement( $errors, "difference in totals")
),
$difference
) |
...