An if
-then
-else
statement is executed by first evaluating the Expression. If
evaluation of the Expression completes abruptly for some reason, then the if
-
then
-else
statement completes abruptly for the same reason. Otherwise, execution continues by making a choice based on the resulting value:
true
, then the first contained Statement (the one before the else
keyword) is executed; the if
-then
-else
statement completes normally only if execution of that statement completes normally.
false
, then the second contained Statement (the one after the else
keyword) is executed; the if
-then
-else
statement completes normally only if execution of that statement completes normally.