POSITION:028,114
COLOUR:STANDARD
TEXT:00,Using "if-elsif" allows you to check for a specific set of outcomes to a
TEXT:16,situation, rather then using "either this or the other" kind of logic.
TEXT:16,It also lets you analyze a problem from a step-by-step approach,
TEXT:16,eliminating the need for designing complex expressions and typing out
TEXT:16,many "if" statements. A demo program is available that shows one use
TEXT:16,of "if-elsif" chains.
TEXT:32,You can have what is called nested "if" statements, where one "if"
TEXT:16,statement leads to a second "if" statement when its expression is true:
COLOUR:EUPHORIA
TEXT:32,if              then
COLOUR:POINTS
TEXT:00,   expression 1
COLOUR:EUPHORIA
TEXT:16,     if              then
COLOUR:POINTS
TEXT:00,        expression 2
TEXT:16,          one or more statements that run only if expression 2 is true
COLOUR:EUPHORIA
TEXT:16,     end if
TEXT:16,end if
