IF_THEN - Conditional execution of operations (Scripting operation)

(09/16/06)

PURPOSE

Allow conditional execution of sections of the SPIDER operation stream, depending on the logical value of an expression. Modeled after the FORTRAN 'IF...ELSEIF...ELSE...ENDIF'.   Example.

SEE ALSO

ELSEIF_THEN [Conditional execution of operations (Scripting operation)]
ELSE [Conditional execution of operations (Scripting operation)]
IF [Conditional expression execution (Scripting operation)]
IF_GOTO [Conditional jump (Scripting operation)]

USAGE

.OPERATION: IF( <EXP> <LC> <EXP> ) THEN
~~~~~~~
~~~~~~~
ENDIF

Where:

  1. <EXP> is an expression
  2. <LC> is a logical comparator. The following comparators are available:
  3. 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 ([ysize] >= 15) THEN
    AC
    input001
    output001
    ENDIF
    IF (INT([iter]/2) == [iter]/2) THEN
    AC
    input_even
    output_even
    ENDIF

    IF ([ysize] < 15) THEN
    AC
    input001
    output001
    ELSEIF ([ysize] < 150) THEN
    AC
    input001
    output002
    ELSE
    AC
    input001
    output003
    ENDIF

  2. Nesting of IF_THEN..ELSE...ENDIF is limited to MAXPRC levels. See: CMLIMIT.INC for current value of MAXPRC.

  3. For every 'IF_THEN' there must be a closing ENDIF!

  4. There are no '.OR.' or '.AND.' comparators.

  5. This operation available in SPIDER release 15.++.

  6. Implemented by: ArDean Leith

SUBROUTINES

LOGIFQ

CALLER

SPIDER

© Copyright Notice /       Enquiries: spider@wadsworth.org