From Lavish Software Wiki
Revision as of 05:10, 22 February 2005 by Lax (talk | contribs)
(diff) ←Older revision | view current revision (diff) | Newer revision→ (diff)
Jump to navigation Jump to search


string If[condition,value when true,value when false]
- or -
string If[condition,value when true]


Allows conditional usage of different strings. The condition is evaluated as a mathematical formula, after which the result is tested to mean either true (not equal to zero) or false (equal to zero). If the condition evaluates to true, the "value when true" is used. If not, the "value when false" is used, if any.


echo A coin is flipped, and shows ${If[${Math.Rand[2]==1},heads,tails]}

See Also