Answers to Questions about  Ada fixed count iterations 

 

Definition:  Fixed-count iterations are controlled by the loop control variable (abbreviated LCV)

 

  1. What types are permitted for the LCV? discrete_subtype_definition

 

  1. What is the scope of the LCV (i.e. where is it known? where can it be printed ?  inside the loop iteration body

 

  1. Can the LCV be modified by the programmer within the iteration body?  no

 

  1. What is the value of the LCV after normal termination of the iteration? unknown

 

  1. When are the final (and increment/decrement) expressions evaluated?  before the loop is executed

 

  1. Is an increment other than successor permitted?  no  (assuming increment means moving in a positive direction)

 

  1. Is iteration backward through a range allowed and if so, how is it specified?   yes    reverse

 

  1. Is transfer into the iteration permitted and if so, what effect does it have on the LCV?   NO

 

  1. How is the iteration body delimited?  loop   end loop;

 

  1. 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