ENDDO - End of DO loop (Scripting operation)

(11/7/06)

PURPOSE

To terminate repetitive execution of a section of the SPIDER operation stream. Terminates a 'DO' loop.   Example.

SEE ALSO

DO [Start of a loop (Scripting operation)]
LB [Label for jump operation or end of DO-loop (Scripting operation)]

USAGE

.OPERATION: DO <REG>=<LOWER>,<UPPER>,<INCREMENT>
~~~~~~~
~~~~~~~
ENDDO

Where:
1. <REG> is a loop index variable where the value of the index is accumulated. (SPIDER still accepts an earlier syntax where <REG> was a single letter (a...z or A..Z) which denotes the loop index).
2. <LOWER> is a integer constant that specifies the lower bound of the loop index.
3. <UPPER> is a integer constant that specifies the upper bound of the loop index.
4. <INCREMENT> is an optional integer constant that specifies an incremental value that is added to the loop index with each cycle of the loop. Default value for <INCREMENT> is 1.

EXAMPLE:

DO [imgnum]=5,17
~~~~~~~
~~~~~~~
ENDDO

In the above example, DO will repeat any operations (~~~~~) with the loop index variable [imgnum] varying from 5 to 17.

Modeled after the FORTRAN 'ENDDO' syntax.

NOTES

  1. Prior to SPIDER release 15.0, 'DO' loops were terminated with a label operation 'LB'. This label had to be specifed when invoking the loop and when ending the loop. This earlier syntax is often found in SPIDER procedures and is still supported but is now deprecated. Example:
    DO LB4 [num]=1,9
    SH
    ALL{***[num]}
    SHI{***[num]}
    (15, 8)
    LB4

  2. More information on DO-loops.

  3. Implemented by: ArDean Leith

SUBROUTINES

SPIDER, FINDLBQ, GETLBNO

CALLER

SPIDER