.ads -- Spec file
.adb -- Body file [implementation]
.ada -- File containing multiple compilation units or completion of SEPARATE packages/subprograms.
block with local scope:
declare
x : integer; -- local variable
begin
null; -- operations go here.
end;
free memory
call an instantiation of Ada.Unchecked_Deallocation on the appropriate access type.
conditional expression (in Ada 2012)
(if CONDITION then VALUE_1 else VALUE_2)
(case VARIABLE is
when COND_1 => RESULT_1,
when COND_2|COND_3 => RESULT_2, -- using alternatives
when COND_4..COND_8 => RESULT_3, -- using ranges
when COND_9..COND_11|COND_13 => RESULT_4 -- using both
when others => RESULT_5 -- using default; w/o an others case coverage of all possible values is enforced.
)
.ads -- Spec file .adb -- Body file [implementation] .ada -- File containing multiple compilation units or completion of SEPARATE packages/subprograms.
block with local scope:
declare x : integer; -- local variable begin null; -- operations go here. end;
call an instantiation of
Ada.Unchecked_Deallocation
on the appropriate access type.conditional expression (in Ada 2012)
(if CONDITION then VALUE_1 else VALUE_2) (case VARIABLE is when COND_1 => RESULT_1, when COND_2|COND_3 => RESULT_2, -- using alternatives when COND_4..COND_8 => RESULT_3, -- using ranges when COND_9..COND_11|COND_13 => RESULT_4 -- using both when others => RESULT_5 -- using default; w/o an others case coverage of all possible values is enforced. )
Integer
Float
(user defined) Type Currency is delta 0.01 digits 20;
(for S being a Scalar subtype) S'Min( S_1, S_2 ) S'Max( S_1, S_2 )
integer division
3 / 7
abs
(Given B as an instantiation of Ada.Strings.Bounded.Generic_Bounded_Length) B.Bounded_String
Ada.Strings.Unbounded.Unbounded_String
etc.