Difference between revisions of "Else"
From Wiki
(→Example) |
|||
(One intermediate revision by the same user not shown) | |||
Line 1: | Line 1: | ||
{{body|Else| | {{body|Else| | ||
Used in conjunction with [[if]], processed only when the [[if]] statement evaluates as [[false]]. Must be placed immediately after the [[true]] command from the [[if]] statement.}} | Used in conjunction with [[if]], processed only when the [[if]] statement evaluates as [[false]]. Must be placed immediately after the [[true]] command from the [[if]] statement.}} | ||
+ | == Example == | ||
+ | <pre> | ||
+ | set %a #false | ||
+ | if %a | ||
+ | display ok % , a is True | ||
+ | else | ||
+ | display ok % , a is False | ||
+ | halt | ||
+ | </pre> | ||
+ | Will always display %a is [[false]] | ||
== Related Commands == | == Related Commands == |
Latest revision as of 10:49, 3 August 2007
Synopsis
Else
Description
Used in conjunction with if, processed only when the if statement evaluates as false. Must be placed immediately after the true command from the if statement.
Example
set %a #false if %a display ok % , a is True else display ok % , a is False halt
Will always display %a is false
Related Commands
If |
See also
Main Page | Documentation |