The "Unknown:"s below indicate that an entry is incomplete.
begin ... end(1) | block (grouping statements, especially when statements are not expressions) |
foo ... end foo where foo in { if, do, ... } | block (grouping statements, especially when statements are not expressions) |
nothing needed | breaking lines (useful when end-of-line and/or indentation has a special meaning) |
-- | commenting (until end of line) |
< > <= >= | comparison |
Integer'min / Integer'max | comparison (min / max (binary or more)) |
= /= | equality / inequality (deep) |
( ... ) | grouping expressions |
new | manual memory allocation (allocation) |
case-insensitive | tokens (case-sensitivity (keywords, variable identifiers...)) |
[a-zA-Z](_?[a-zA-Z0-9])* | tokens (variable identifier regexp) |
Camel_Case | tokens (what is the standard way for scrunching together multiple words) |
:= | variable assignment or declaration (assignment) |
v: t | variable assignment or declaration (declaration) |
Unknown:
documentation comment
f(a,b,...) | function call |
f | function call (with no parameter) |
function f(para1 : type1; para2 : typ2; ...) return retval is begin ... end f; | function definition |
procedure f(para1 : typ1; para2 : MODE type2; ...) is begin ... end f; MODE ::= | OUT | IN OUT | function definition (procedures) |
return(2) | function return value (breaks the control flow) |
<retvar name> = val; | function return value (setting the result) |
/ exit | breaking control flow (continue / break) |
goto | breaking control flow (goto (unconditional jump)) |
return(2) | breaking control flow (returning a value) |
exception when exception_name => | exception (catching) |
raise | exception (throwing) |
if c then ... end if | if_then |
if c then b1 elsif c2 then b2 else b3 end if | if_then_else |
loop ... exit when c; end loop | loop (do something until condition) |
for i in reverse 1 .. 10 loop ... end loop | loop (for each value in a numeric range, 1 decrement) |
for i in 1 .. 10 loop ... end loop | loop (for each value in a numeric range, 1 increment (see also the entries about ranges)) |
loop ... end loop | loop (forever loop) |
while c loop ... end loop | loop (while condition do something) |
case val is when v1 => ... when v2 | v3 => ... when others => ... end case; | multiple selection (switch) |
; | sequence |
Unknown:
loop (for each value in a numeric range, free increment)
: | annotation (or variable declaration) |
t(e) | cast (downcast (need runtime checking)) |
t(e) | cast (upcast) |
type n is t | declaration |
constant T | mutability, constness (type of a constant value) |
in out T(3) | mutability, constness (type of a mutable value) |
method(parent(dispatching-parameter)) | accessing parent method |
parent(dispatching-parameter).method | accessing parent method |
type c is tagged record ... end record(4) | class declaration |
dispatching parameter | current instance |
type child is new parent with record ... end record | inheritance |
Requires instantiation of Ada.Unchecked_Deallocation | manually call an object's destructor |
object.method(para) | method invocation |
method(object, para) | method invocation |
object.method | method invocation (with no parameter) |
method(object) | method invocation (with no parameter) |
o2.all := o.all | object cloning |
o_ : T'Class := o(5) | object cloning |
v : class_name | object creation |
in | testing class membership |
package p is -- Declare public package members here private -- Declare private package members here end p; package body p is ... -- Define package implementation here end p; | declare |
package p is ... end; package body p is ... end; | declare (selective export) |
with p; use p; | import (everything into current namespace) |
with p; | import (package (ie. load the package)) |
with p; use type p.type1; ... | import (selectively) |
. | package scope |
s(n) | accessing n-th character |
'Val | ascii to character |
'z' | character "z" |
'Pos | character to ascii |
Character | character type name |
T'Image(e)(6) | convert something to a string (see also string interpolation) |
* | duplicate n times |
s(n..m) | extract a substring |
index | locate a substring |
index_non_blank / find_token | locate a substring |
index(Going => Backward) | locate a substring (starting at the end) |
T'Output(6) | serialize (marshalling) |
Put | simple print (on any objects) |
Put_Line | simple print (on strings) |
& | string concatenation |
= /= | string equality & inequality |
'Length | string size |
"..." | strings (with no interpolation of variables) |
String | type name |
T'Input(6) | unserialize (un-marshalling) |
To_Upper / To_Lower | upper / lower case character |
to_upper / to_lower | uppercase / lowercase / capitalized string |
Unknown:
strings (with interpolation of variables)
strings (end-of-line (without writing the real CR or LF character))
multi-line
false | false value |
not(7) | logical not |
or / and | logical or / and (non short circuit (always evaluates both arguments)) |
or else / and then | logical or / and (short circuit) |
true | true value |
Boolean | type name |
Insert | adding an element at index (return the new list (no side-effect)) |
Prepend | adding an element at the beginning (list cons) (return the new list (no side-effect)) |
Append | adding an element at the end (return the new list (no side-effect)) |
Find | find an element |
First_Element | first element |
First | first element (iterator) |
for v in range loop .. end loop | for each element do something |
Iterate | for each element do something |
Last_Element | last element |
Last | last element (iterator) |
& | list concatenation |
Length | list size |
a(i) | list/array indexing |
Reverse_Elements | reverse |
Containers.Vectors.Vector or Ada.Containers.Doubly_Linked_Lists.List | type name |
Element | dictionary (access: read) |
Replace_Element | dictionary (access: write) |
Contains | dictionary (has the key ?) |
Delete | dictionary (remove by key) |
Containers.Ordered_Maps.Map | dictionary (type name) |
type typ is(8) | enumerated type declaration |
Null(9) | optional value (null value) |
v | optional value (value) |
a .. b | range (inclusive .. inclusive) |
. | record (selector) |
'(10) | record (selector) |
type Typ is record N1 : Typ1; N2 : Typ2 := default_val; ... end record; | record (type declaration) |
'access | reference (pointer) (creation) |
.[all] | reference (pointer) (dereference) |
( a, b, c ) | tuple constructor |
type Typ (Choice : Discrete_Type) is record case Choice is when Choice_1 => N1 : Typ1; ... when Choice_2 | Choice_3 => ... when others => ... end case; end record; | union type declaration |
Unknown:
optional value (null coalescing)
and / or / xor | bitwise operators (and / or / xor) |
not | bitwise operators (bitwise inversion) |
Shift_Left / Shift_Right / Shift_Right_Arithmetic / Rotate_Left / Rotate_Right | bitwise operators (left shift / right shift / unsigned right shift) |
** | exponentiation (power) |
Log(X => val, Base => 10.0) | logarithm (base 10) |
Log(X => val, Base => 2.0) | logarithm (base 2) |
Log | logarithm (base e) |
rem | modulo (modulo of -3 / 2 is -1) |
mod | modulo (modulo of -3 / 2 is 1) |
- | negation |
1000.0, 1.0E3 | numbers syntax (floating point) |
1_000, 10_00, 100_0 | numbers syntax (integer thousand-separator) |
2#1#, 8#7#, 16#f# | numbers syntax (integers in base 2, octal and hexadecimal) |
1000, 1E3 | numbers syntax (integers) |
Random(11) | random (random number) |
Reset | random (seed the pseudo random generator) |
sqrt / exp / abs | square root / e-exponential / absolute value |
sin / cos / tan | trigonometry (basic) |
asin / acos / atan(12) | trigonometry (inverse) |
Float'Truncation / Float'Rounding / Float'Floor / Float'Ceiling(13) | truncate / round / floor / ceil |
/ Rounding / Floor / Ceiling | truncate / round / floor / ceil |
type T is digits N range Low..High; | type name (floating point) |
type T is delta S digits N range Low..High;(14) | type name (floating point) |
type T is range Low...High; | type name (integers) |
Unknown:
addition / subtraction / multiplication / division
operator priorities and associativities
Call a task entry on the other thread | Joining Another Thread (Suspending a Thread Until Another Thread Establishes An Internal State) |
Call task entry serviced just before task termination | Joining Another Thread (Suspending a thread until another thread completes) |
Set_Priority(Priority_Value); | Thread Prioritization (Changing Thead Priority) |
pragma Priority(expression); | Thread Prioritization (Establishing a base thread priority) |
pragma Locking_Policy(Ceiling_Locking); | Thread Prioritization (Selecting a Prioritization Model) |
protected Object_Name is [entry entry_name(Parameter : [in out] is type [...]); procedure procedure_name(Parameter : [in out] is type [...]); function function_name return type; private shared data declaration end Object_Name; | Thread Synchronization (Defining a Synchronized Shared Resource) |
Objectg_Name.Entry_Name(Parms) | Thread Synchronization (Monitor Syntax) |
Object_Name.Function_Name | Thread Synchronization (Synchronized Reading of a Shared Resource) |
Object_Name.Entry_Name(Parms) Object_Name.Procedure_Name(Parms) | Thread Synchronization (Synchronized Writing to a shared resource) |
pragma Volatile(Object_Name); | Thread-safe sharing of data without synchronization (Ensuring access is always via a local copy of the shared data) |
pragma Atomic(Object_Name); | Thread-safe sharing of data without synchronization (Ensuring access is atomic) |
call an entry with parameters | passing data directly between threads |
Tasks are started when created / call Stop entry or "abort task-object-name" | starting / stopping threads |
select task_entry_call; or delay timeout_limit; end select; | terminating thread communication due to a time-out |
task task_name is [entry entry_name[(parameter ...)]...] end task_name | thread definition |
task type task_type_name is [entry entry_name[(parameter ...)]...] end task_type_name | thread definition |
MyTask : task_type_name; | thread object creation |