else is a reserved word which starts a fallback-branch if all other named cases do not apply.
It can occur in
else-branch obtains program flow, if no other condition has been met.
It cannot be paired with an explicit expression, but depends on expressions stated at others place, so an
else per se does not have a condition.
if … then … else-statements, instructions are executed to the following scheme:
falseStatement is executed if
expression evaluates to
else-branch assumes program flow, if no
case expression of
expression neither evaluates to
action2 is executed.
In Pascal there is no
if back to back does not pose a problem.
Note, that the second
if … then constitutes on its own a single statement.
The requirement that
else is followed by a statement is therefore fulfilled.
if expression0 then
else if expression1 then
if … then … else
if itIsMorning() then
if itIsAHoliday() then
The reference guide explains, quote:
If.. then .. elseconstructs, some ambiguity may [arise] as to which
elsestatement pairs with which
ifstatement. The rule is that the
elsekeyword matches the first
ifkeyword (searching backwards) not already matched by an