CalcIt Commands

IF...ELSEIF...ELSE...END

IF(Cont);
 ....
 ....
ELSE
 ....
 ....
END;

If conditional expression Cont returns TRUE (1) then statements under IF are executed else statements under ELSE are executed. ELSE is optional. See also SELECT.

ELSEIF can be used to form a syntax counterpart of the SELECT command:

if(Cont1);
 ...
elseif(Cont2);
 ...
elseif(Cont3);
 ...
else
 ...
end;

Any number of ELSEIF can be used. When neither the condition of IF nor the conditions of all ELSEIF are met then the ELSE section commands are executed (if optional ELSE is used).

Go Back