Search                        Top                                  Index
HELP STEP                                               A. Sloman, April 1985

This is used in one form of the FOR statement, viz:

    for <action> step <action> till <condition> do <actions> endfor

This first executes the instructions <action1>. Next <condition> is checked to
make sure it is not yet true (if it is, nothing more will happen). After that
the <actions> are repeatedly executed, each execution being followed by the
execution of the instructions <actions2> and the checking of the condition.
This continues until the condition evaluates to TRUE, when the execution of
the FOR loop is terminated. Thus:

    for "fred" -> person step father(person) -> person
        till person = "adam"
    do
        person =>
    endfor

would print out something like:

    ** fred
    ** frank
    ** tom
    .....
    ** cain

See HELP
    *FOR   - forms and uses of FOR loops in iteration over lists and integers
    *LOOPS - for other types of iteration