Flow control

The statements within a Fortran program are implemented in their natural order. Elementary programs of the kind discussed so far (containing input, formula translation and output) do not have the ability to apply conditions to the process or to repeat sections of the code. For this we need mechanisms for controlling the order and the conditions under which the statements are executed. This section describes such flow control constructs together with the IF statement, the first of which is the IF construct.



Copyright © 1999-2024 Silverfrost Limited