CYCLE - Starts next loop iteration (Scripting operation)

(7/5/17)

PURPOSE

Immediately cease current DO Loop iteration and commence following iteration (if any). Modeled after the FORTRAN 90 'CYCLE' syntax.   Example.

SEE ALSO

EXIT [Ends execution of current operation loop (Scripting operation)]
GOTO [GOTO (Scripting operation)]
DO [Start of a loop (Scripting operation)]

USAGE

.OPERATION: CYCLE
<or>

.IF(<EXP>.<LC>.<EXP>) CYCLE

[Only usefull inside a 'DO' Loop.]

Where:

  1. <EXP> is an expression
  2. <LC> is a logical comparator. The following comparators are allowed:
  3. EQ or ==    Equal
    NE    Not equal
    GT or >    Greater
    GE or >=    Greater/equal
    LT or <    Less
    LE or <=    Less/equal

EXAMPLE:

DO [iter]=1,100
~~~~~~~
~~~~~~~
CYCLE
; NEVER USED
; NEVER USED
ENDDO

MORE MEANINGFULL EXAMPLE:

DO [iter]=1,9999
IQ FI [exists]
input{****[iter]
IF ([exists] == 1) CYCLE
AC
input{****[iter]
output{****[iter]
ENDDO

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. This earlier syntax is often found in SPIDER procedures and is still supported but is now deprecated. Example:
    DO LB4 [iter]=1,9999
    IQ FI [exists]
    input{****[iter]
    IF ([exists] .EQ. 0) GOTO LB4
    AC
    input{****[iter]
    output{****[iter]
    LB4
    LB5

  2. More information on DO-loops.

SUBROUTINES

SPIDER, FINDLBQ, GETLBNO

CALLER

SPIDER