IF_GOTO - Conditional jump (Scripting operation)

(11/14/11)

PURPOSE

To allow jumps to other locations in the command stream depending on the validity of equalities or inequalities. Modeled after the FORTRAN 'IF'.   Example.

SEE ALSO

IF [Conditional expression execution (Scripting operation)]
IF_THEN [Conditional execution of operations (Scripting operation)]
GOTO [GOTO (Scripting operation)]
DO [Start of a loop (Scripting operation)]

USAGE

.OPERATION: IF ( <EXP> <LC> <EXP> ) GOTO LB<N>

Where:
  1. <EXP> is an expression
  2. <N> is a label, with <N> assuming any value between 1 and 99.]
  3. <LC> is a logical comparator. The following comparators are available:
  4. Comparator Alternate Comparision
    .EQ. == Equal to
    .NE. /= Not equal to
    .GT. > Greater than
    .GE. >= Greater than or equal to
    .LT. < Less than
    .LE. <= Less than or equal to

NOTES

  1. Examples:
    IF ([loop] >= 15) GOTO LB9
    IF ([xsize] < [ysize]) GOTO LB12

  2. Only forward jumping is allowed. No jumping into a DO-loop.

SUBROUTINES

LOGIFQ

CALLER

SPIDER

© Copyright Notice /       Enquiries: spider@wadsworth.org