In principle, a net program contains three control structure:
IF (condition) THEN
statements
ELSE
andere statements
ENDIF
The second construction is programmed as follows:
SELECT CASE (variable)
CASE (value1)
statements
CASE (value2)
statements
...
CASE default
other statements
END SELECT
An alternative for the latter construction is the construction IF - THEN - ELSEIF - ELSE.
A major disadvantage of this construction is that all alternatives need to be tested, even if it takes
until the end of the list to find that an option in fact applies.
DO i = istart, iend, istep
statements
ENDDO
If necessary, use the CYCLE and EXIT statements to immediately start the next iteration step of the
loop or to exit the loop, respectively.
DO
IF (.NOT.condition) EXIT
statements
ENDDO
instead of
DO WHILE (condition)
statements
ENDDO
The third construction is programmed as follows:
DO
statements
IF (condition) EXIT
ENDDO
The SWAN team 2022-08-10