else
Used in conjunction with if ... then ... end if commands it defines the block of commands to be
executed if all previous conditions reveals to be false.
Syntax:
if condition
expression then
commands to be executed
if condition is true
else
commands to be executed
if condition is false
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)
See also if ... then ... end if and elseif commands.