next up previous contents index
Next: FOR /IN Up: FOR Previous: FOR   Contents   Index


FOR Indexed

        [SIC\]FOR Loop_Variable n1 n2 n3 TO n4 BY n5 n6 TO n7

        The  loop  specified  in this example will execute for the following
        values of the index :
                n1
                n2
                n3, n3 + n5, n3 + 2 n5, n3 + 3 n5, ... , n4
                n6, n6 + 1, n6 + 2, ... , n7
        (assuming that n4-n3 is a multiple of n5, n7-n6 an integer).

    Loop variables are undefined outside the loop, and must not be previous-
    ly  defined.  Here, the loop variables are Double Precision numbers, and
    non-integer start, end, and step can be used. Invalid ranges are ignored
    at  execution  time: e.g. in the previous example, the loop would not be
    executed for n3 TO n4 BY n5 if n5*(n4-n3) < 0, but no error is signaled.
    Increments  of 0 produce an error. The index of the loop will be substi-
    tuted to the loop variable Loop_Variable during loop execution.


Gildas manager 2024-04-18