VMS Help  —  PASCAL  Statements  FOR  Examples
  Example:

      FOR I := 1 TO 10 DO
        FOR J := 1 TO 10 DO
           A[I,J] := 0;

  This example shows how you can nest FOR loops.  For  each  value
  of  I,  the executing program steps through all 10 values of the
  array J and assigns the value 0 to each component.

  Example:

     FOR I IN Set 1 DO
        Set2 := Set2 + [I + 1];

  This example shows a FOR-IN statement.   Set2  is  assigned  the
  successor of each value in Set1.
Close Help