ELSE - Conditional execution of operations (Scripting operation)
(11/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' syntax.
- SEE ALSO
| IF_THEN | [Conditional execution of operations (Scripting operation)] |
| ELSEIF_THEN | [Conditional execution of operations (Scripting operation)] |
- USAGE
- .OPERATION: IF(<EXP>.<LC>.<EXP>) THEN
- ~~~~~~~
- ~~~~~~~
- ELSE
- ~~~~~~~
- ~~~~~~~
- ENDIF </dt>
Where:
1. <EXP> is an expression.
2. <LC> is a logical comparator. The following comparators
are allowed:
- EQ equal
- NE not equal
- GT greater
- GE greater/equal
- LT less
- LE less/equal
EXAMPLE:
- IF([ysize].LT.15) THEN
- AC
- input001
- output001
- ELSEIF ([ysize].LT.150) THEN
- AC
- input001
- output002
- ELSE
- AC
- input001
- output003
- ENDIF
NOTES
- Nesting of IF_THEN..ELSE...ENDIF is limited to MAXPRC
levels. See: CMLIMIT.INC
for current value of MAXPRC.
- For every 'IF_THEN' there must be a closing ENDIF!
- There is NO '.AND.' comparator.
- The operation 'ELSEIF' was not available prior to SPIDER release 15.0.
- Implemented by: ArDean Leith
- SUBROUTINES
- LOGIFQ
- CALLER
- SPIDER
©
Copyright Notice /
Enquiries: spider@wadsworth.org