All pastes #1892609 Raw Edit

Ada 2012 conditional expressions

public text v1 · immutable
#1892609 ·published 2010-07-01 08:21 UTC
rendered paste body
for J in 1 .. 3 loop
   Put_Line ((if J = 1 then "one"
              elsif J = 2 then "two"
              else "three"));
end loop;

for J in Boolean loop
   B := F (if J then "A" else "B", if not J then "A" else "B");
end loop;