Next: 2.20 learn
Up: 2. General commands
Previous: 2.18 help
The if-control structure takes the following form:
if ( <logical expression> ) then
<conditional commands>
[elseif ( <logical expression>) then
<conditional commands>]
[else
<conditional commands>]
endif
The logical expressions may contain numerical comparisons with syntax:
<arithmetic expression> <operator> <arithmetic comparison>
The following operators are allowed:
.lt. ! less than
.le. ! less or equal
.gt. ! greater than
.ge. ! greater or equal
.eq. ! equal
.ne. ! not equal
Logical expressions can be combined by logical operators:
.not. ! negation of the following expression
.and. ! logical and
.xor. ! logical exclusive or
.or. ! logical or
Logical operations may be nested and grouped by brackets "(" and ")".
Thomas Proffen {Billinge}
1999-07-20