Difference between revisions of "Command:If"
Jump to navigation
Jump to search
(→Syntax) |
|||
Line 7: | Line 7: | ||
== Examples == | == Examples == | ||
+ | if x == 5 | ||
+ | { | ||
+ | if y == 6 | ||
+ | varset z 17 | ||
+ | } | ||
+ | else | ||
+ | varset z 20 | ||
== See Also == | == See Also == | ||
*[[LavishScript:Commands|Commands]] | *[[LavishScript:Commands|Commands]] | ||
{{Command-Stub}} | {{Command-Stub}} |
Revision as of 20:23, 1 March 2005
Contents
Syntax
if (condition) statement1
[else statement2]
Description
Conditionally executes a group of statements, depending on the value of an expression.
Examples
if x == 5 { if y == 6 varset z 17 } else varset z 20