if
latest
Condition for the program.
IF
NAME
if - Condition for the program.
SYNOPSIS
if expression then statements elseif expression then statements … else statements *endif
DESCRIPTION
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.
EXAMPLES
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
AUTHOR
Written by Pierre Laplante and Caroline Laplante, <laplante@sednove.com>