VMS Help
PASCAL, Statements, FOR, Examples

 *Conan The Librarian (sorry for the slow response - running on an old VAX)

  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     HLB-list     TLB-list     Help  

[legal] [privacy] [GNU] [policy] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.