The "if" Statement
if (test) then
then-statement
else
else-statement
end if;if (x == 10) then
message("x is 10");
end if;if (x == 10) then
message("x is 10");
else
message("x is not 10");
end if;if (x == 1) then
message("x is 1");
else if (x == 2) then
message("x is 2");
else if (x == 3) then
message("x is 3");
else
message("x is something else");
end if;Last updated