Loops/Nested: Difference between revisions

(→‎{{header|Julia}}: A new entry for Julia)
Line 704:
END
 
C FORTRAN 77 does not have come with a random number generator, but it is
C is easy enough to type "fortran 77 random number generator" into your
C preferred search engine and to copy and paste what you find. The
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
1,220

edits