In principle, a net program contains three control structure:
IF (condition) THEN statements ELSE andere statements ENDIFThe second construction is programmed as follows:
SELECT CASE (variable) CASE (value1) statements CASE (value2) statements ... CASE default other statements END SELECTAn 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 ENDDOIf 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 ENDDOinstead of
DO WHILE (condition) statements ENDDOThe third construction is programmed as follows:
DO statements IF (condition) EXIT ENDDO
The SWAN team 2022-08-10