if - Condition for the program.
if expression then statements elseif expression then statements … else statements *endif
This statement is used to control what part of a program is executed. One can use an "if" condition at the beginning of a loop. The function adds a condition for the program. It will execute this part of the program if the condition is respected.
if expression is a string with value true, then if is true.
if expression is a string with value false, then if is false.
if expression is a string and the number of the string is not 0 than its true else its false. If any characters under than a number is in the string, it will not be ccompared to a number.
if x == 1 then "x=1\n"; elseif x == 2 then "x=2\n"; else "x=?\n"; endif if x == 1 then "x=1\n"; elseif x == 2 then "x=2\n"; else "x=?\n"; endif
Written by Pierre Laplante and Caroline Laplante, <laplante@sednove.com>
Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin commodo. Cras purus odio, vestibulum in vulputate at, tempus viverra turpis.
1.0 2014-09-09 21:24:14 laplante@sednove.com