4.5.7 Conditional Expressions
Syntax
Name Resolution Rules
A
condition
is expected to be of any boolean type.
Legality Rules
Dynamic Semantics
For the evaluation of an
if_expression,
the
condition
specified after
if, and any
conditions
specified after
elsif, are evaluated in succession (treating a
final
else as
elsif True
then), until one evaluates
to True or all
conditions
are evaluated and yield False. If a
condition
evaluates to True, the associated
dependent_expression
is evaluated, converted to the type of the
if_expression,
and the resulting value is the value of the
if_expression.
Otherwise (when there is no
else clause), the value of the
if_expression
is True.
Ada 2005 and 2012 Editions sponsored in part by Ada-Europe