HOME GUIDE OPERATIONS DOCS FAQ TECHNIQUES FORMATS INSTALL NEW TIPS WEB LINKS Wadsworth Labs

IF_GOTO - Conditional jump (Scripting operation)

(11/14/06)

PURPOSE

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

SEE ALSO

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

USAGE

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

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

NOTES

  1. Examples:
    IF([loop].GE.15) GOTO LB9
    IF ([xsize].LT.[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