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

IF - Conditional expression execution (Scripting operation)

(12/05/11)

PURPOSE

To allow evaluation of a conditional expression or loop iteration control. (Modeled after the FORTRAN 'IF' statement).

SEE ALSO

IF_GOTO [Conditional jump (Scripting operation)]
IF_THEN [Conditional execution of operations (Scripting operation)]
DO [Start of DO loop (Scripting operation)]
EXIT [Ends execution of current operation loop (Scripting operation)]
CYCLE [Starts next loop iteration (Scripting operation)]

USAGE

.OPERATION: IF ( <EXP><LC><EXP> ) <R> = <EXP>
    <or>
IF ( <EXP><LC><EXP> ) EXIT
    <or>
IF ( <EXP><LC><EXP> ) CYCLE

Where:

  1. <EXP> is an expression
  2. <R> is a register variable.
  3. <LC> is a logical comparator. The following comparators are allowed:
  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( [xlen] .GE. 15 )   [xpad] = 57
    IF( [xlen] >= 15 )   [xpad] = 57
    IF( [xlen] .LT. (13-2) )   [resol] = 5.6
    IF( [xlen] .LT. 13 )   CYCLE     (Within a DO loop)

SUBROUTINES

LOGIFQ

CALLER

SPIDER

© Copyright Notice /       Enquiries: spider@wadsworth.org