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 .or. ! logical or
Logical operations may be nested and grouped by brackets "(" and ")".