4. Control Structures - JulTob/Ada GitHub Wiki
Ada contains control structures to direct the flow of the program. Obviously.
Conditions
Conditions stablish the execution of a control structure.
They can be of the following
-- Booleans;
b : Boolean := True;
-- Boolean values;
True, false;
-- Boolean expressions
--- Identity
if
b = true; b /= False;
n = 0; n /= 10;
d = monday
--- Position
n > 10; n <= 5 ;
--- Range
index in 21..33;
--- Case
case d is
when monday => Do_Option_Monday;
when tuesday..friday => Other_Option;
when others => Option_for_others;