Logo

Programming-Idioms

History of Idiom 131 > diff from v41 to v42

Edit summary for version 42 by thethanlaw:
New Ada implementation by user [thethanlaw]

Version 41

2019-09-30, 19:20:44

Version 42

2019-10-01, 04:52:17

Idiom #131 Successive conditions

Execute f1 if condition c1 is true, or else f2 if condition c2 is true, or else f3 if condition c3 is true.
Don't evaluate a condition when a previous condition was true.

Idiom #131 Successive conditions

Execute f1 if condition c1 is true, or else f2 if condition c2 is true, or else f3 if condition c3 is true.
Don't evaluate a condition when a previous condition was true.

Extra Keywords
else switch case
Extra Keywords
else switch case
Code
if a then
    f;
elsif b then
    g;
else
    h;
end if;
Comments bubble
assume that f, g, and h are procedure and that a and b are Boolean