Home | Contact | Pricing | News | Events | Partners | Mailing List | Site Map
  • Development log
  • Technical papers
  • Live docs

More Resources

Recent Papers

Browse by Technology

Dev Log Archives

Developer Center

[GNAT] Conditional expressions are implemented

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 by Posted in Development Log, GNAT Compilation System