Q For Language Lawyers
Steve Kargl
sgk@troutmask.apl.washington.edu
Thu Feb 3 22:10:00 GMT 2011
On Thu, Feb 03, 2011 at 03:49:51PM -0600, jimmie.davis@l-3com.com wrote:
> Hello all,
>
> Working on porting some very old fortran (from a SEL / GOULD system) to
> gfortran.
>
> The code seems to believe that the namespace for format labels and for
> statement labels are different:
>
> DO 10 I=,100
>
> 10 END DO
>
>
> <bunch of code>
>
> 10 FORMAT(A10)
> WRITE(5,1),STRING
>
>
> Is this standard conforming ?
>
Form the Fortran 95 standard:
3.2.4 Statement labels
The same statement label shall not be given to more than one statement
in a scoping unit.
8.2.1 Statement labels
A statement label provides a means of referring to an individual statement.
Only branch target statements (8.2), FORMAT statements, and DO terminations
shall be referred to by the use of statement labels (3.2.4).
14.2 Scope of labels
A label is a local entity. No two statements in the same scoping unit may
have the same label.
--
Steve
More information about the Fortran
mailing list