Difference between revisions of "Command:If"
Jump to navigation
Jump to search
Line 6: | Line 6: | ||
== Description == | == Description == | ||
Conditionally executes the following command, depending on the value of an expression. The condition is run through a [[LavishScript:Mathematical Formulae|math calculator]]. If the result is zero, the command is skipped; otherwise it is executed. Command blocks may be used, which begin with a <tt>{</tt> and end with a <tt>}</tt>, and is treated by control statements such as if it were a single command (i.e. executed or skipped as a whole). | Conditionally executes the following command, depending on the value of an expression. The condition is run through a [[LavishScript:Mathematical Formulae|math calculator]]. If the result is zero, the command is skipped; otherwise it is executed. Command blocks may be used, which begin with a <tt>{</tt> and end with a <tt>}</tt>, and is treated by control statements such as if it were a single command (i.e. executed or skipped as a whole). | ||
− | |||
− | |||
− | |||
== Examples == | == Examples == |
Revision as of 14:21, 26 June 2005
Contents
Syntax
If | |
Usage | Intermediate |
Level of Understanding | Intermediate |
Computer Savvy | Beginner |
Logic | Intermediate |
If <condition>
Description
Conditionally executes the following command, depending on the value of an expression. The condition is run through a math calculator. If the result is zero, the command is skipped; otherwise it is executed. Command blocks may be used, which begin with a { and end with a }, and is treated by control statements such as if it were a single command (i.e. executed or skipped as a whole).
Examples
if x == 5 { if y == 6 varset z 17 } else varset z 20