if x A end
x
one
or several statements A
are executed. The condition
x
must be an arbitrary expression, which evaluates to either
0 or 1. The false-case (i.e. x=0) can lead to another branch B
:
if x A else B end
>> function y=H(x) > if (x>=0) > y=1; > else > y=0; > end > end >> H(-2) y = 0 >> H(0) y = 1