Developer Center |
Sunday March 29, 2009
Conditional expressions have been implemented, following the suggested design being considered by the ISO WG9 ARG. These are recognized only if the -gnatX (extensions allowed) switch is used, but are expected to become an official part of the language in the future. The form of a conditional expression is: (if expr then expr {elsif expr then expr} [else expr]) The parens can be omitted in contexts where parens are present anyway, such as subprogram arguments and pragma arguments. If the else clause is omitted, ELSE TRUE is assumed, meaning that (if A then B) is a way to conveniently represent (A implies B) in standard logic.
Posted
in Development Log, GNAT Compilation System