Answers to Questions about Ada fixed
count iterations
Definition:
Fixed-count iterations are controlled by the loop control variable
(abbreviated LCV)
- What
types are permitted for the LCV? discrete_subtype_definition
- What
is the scope of the LCV (i.e. where is it known? –
where can it be printed ? inside the loop
iteration body
- Can
the LCV be modified by the programmer within the iteration body? no
- What
is the value of the LCV after normal termination of the iteration? unknown
- When
are the final (and increment/decrement) expressions evaluated? before the loop
is executed
- Is an
increment other than successor permitted?
no
(assuming increment means moving in a positive direction)
- Is
iteration backward through a range allowed and if so, how is it specified? yes reverse
- Is
transfer into the iteration permitted and if so, what effect does it have
on the LCV? NO
- How is
the iteration body delimited? loop end loop;
- Is it
possible to transfer out of the iteration before the iteration has
completed and if so, how do you do it? yes with an exit