ez.no / exponential / documentation / development / libraries / ez template / operators / control structure handling
These documentation pages are no longer maintained. Please visit the new documentation site.
Evaluates clauses and returns the value of the first clause whose condition is true.
Pairs of parameters are treated as clauses where the first is the condition and the second is the body.
The last clause may have one parameter only in which case it is used as condition and body. E.g.
{cond($b|ne(0),div($a,$b),0)} returns the result of $a/$b if $b is not 0, or 0 if it is.
Returns the first value which exists, this is useful if you want to make sure that you always have a value to work with,
since you can put a constant as the last parameter and constants always exist. E.g.
{first_set($a,$b,$c," ")} returns " " if none of the variables are set.x
Comments