Ada Programming/Keywords/for

This keyword is used in:
 * For loops
 * Representation clauses:
 * attribute definition clause
 * enumeration representation clause
 * record representation clause
 * at clause (obsolescent)
 * Quantified expressions
 * Universal quantification
 * Existential quantification

Nowadays representation clauses are formally called aspect clauses in the last versions of the Reference Manual due to some technicalities, although representation clauses is the name far more extended among Ada programmers. As a historical note, they were known as representation specifications (rep specs) in pre-Ada 83 proposals.

For loops
[loop name ] var  [  ] [type ] range ...  [loop name]

Where range can be:
 * explicit range like " ",
 * range of scalar or array type:  (or   for multidimensional array types)
 * range of an array:  for multidimensional arrays)

Keyword may also be followed by an iterable. This generalizes iteration by including types that have one of the interfaces defined in Ada.Iterator_Interfaces.

Another generalized form of looping iteration uses the keyword in place of. The loop parameter is then referring to components of arrays or of iterable container types, directly.

[loop name ] var [ type]  [  ] iterable ...  [loop name]

Representation clauses
The keywords, and  are used for representation clauses.

A record representation clause specifies the Layout aspect of a record.

An enumeration representation clause specifies the Coding aspect of an enumeration type.

See Ada Programming/Representation_clauses.

Quantified expressions
Quantified expressions are Boolean expressions. They are either True or False, or propagate any exception raised during evaluation.

Universal quantification
Universal quantification expression:

( var  range  predicate) ( var  iterable  predicate)

Both forms evaluate to True when all of the values in range (of iterable) make the predicate yield True. Evaluation of predicate stops when either all values of loop parameter var have been exhausted, or when evaluation for some value yields False (short circuit).

Existential quantification
Existential quantification expression:

( var  range  predicate) ( var  iterable  predicate)

Both forms evaluate to True when some of the values in range (of iterable) makes the predicate yield True. Evaluation of predicate stops when either all values of loop parameter var have been exhausted, or when evaluation for some value yields True (short circuit).

Wikibook

 * Ada Programming
 * Ada Programming/Keywords

Ada Reference Manual

 * (obsolescent)
 * (obsolescent)
 * (obsolescent)
 * (obsolescent)
 * (obsolescent)
 * (obsolescent)
 * (obsolescent)

Ada 83

 * (obsolescent)