Author: zoiba

elseIf
Allows you to queue a series of if statements for testing in a consecutive manner several expressions, this way program can verify the occur of determinate condition and so execute the associated block of commands.
Syntax:
if condition expression then
commands to be executed if condition is true
elseIf alternativeCondition expression then
commands to be executed if condition is false and alternative condition is true
{ elseIf ... then }
{....}
end if
Example:
setautoback(50)
prints("press a number key")
waitKey
x$=chr$(inkey)
if x$="1" then
prints("press 1")
elseif x$="2" then
prints("press 2")
else
prints("press other key")
end if
if x$="4" then :prints("good bye"):end if
prints("press esc to exit")
waitKey (27)
As you can see syntax is similar to if ... then statement.
See also if ... then ... end if and else commands.