Loops/Nested: Difference between revisions
→{{header|Fortran}}
(→{{header|Julia}}: A new entry for Julia) |
|||
Line 704:
END
C FORTRAN 77 does not
C
C preferred search engine and to copy and paste what you find.
C The following code is a slightly-modified version of:
C
C http://www.tat.physik.uni-tuebingen.de/
Line 760:
A[ 1][15] is 20</pre>
{{works with|Fortran|90 and later}}
Here the special feature is that later Fortran allows loops to be labelled (with "outer" in this example) on their first and last statements. Any EXIT or CYCLE statements can then mention the appropriate label so as to be clear just which loop is involved, otherwise the assumption is the innermost loop only. And no "GO TO" statements need appear.
<lang fortran>program Example
implicit none
|