1
if Scilab Group Scilab Function if
3
if then else - conditional execution
6
if expr1 then statements
7
elseif expri then statements
12
The if statement evaluates a logical expression and executes a group of
13
statements when the expression is true. The expri are expressions with
14
numeric or boolean values. If expri are matrix valued the condition is
15
true only if all matrix entries are true.
17
The optional elseif and else provide for the execution of alternate
18
groups of statements. An end keyword, which matches the if, terminates
19
the last group of statements. The line structure given above is not
20
significant, the only constraint is that each then keyword must be on the
21
same line line as its corresponding if or elseif keyword.
23
The keyword then can be replaced by a carriage return or a comma.
25
Warning: the number of characters used to define the body of any
26
conditionnal instruction (if while for or select/case) must be limited to
34
elseif abs(i-j) == 1 then
40
while, select, boolean, end, then, else