(j3.2006) Compilers disagree
Craig Dedo
craig
Tue Oct 27 15:28:19 EDT 2009
Everyone:
In the Fortran 2003 draft, 03-007, the necessary definitions and
restrictions are in section 7.1.6, pp. 127-128. The "define before use"
rule is in paragraph 3 on page 128, lines 8-10, immediately after Note 7.9.
However, the subsequent sentence appears to allow the kind of construct that
Van is talking about. Here is the text:
[Begin quote]
A variable in a specification expression shall have its type and type
parameters, if any, specified by a previous declaration in the same scoping
unit, by the implicit typing rules in effect for the scoping unit, or by
host or use association. If a variable in a specification expression is
typed by the implicit typing rules, its appearance in any subsequent type
declaration statement shall confirm the implied type and type parameters.
[End of quote]
This paragraph is exactly the same as page 151, p 7 in 09-007r3,
lines 3-6.
Sincerely,
Craig T. Dedo
17130 W. Burleigh Place
P. O. Box 423 Mobile Phone: (414) 412-5869
Brookfield, WI 53008-0423 E-mail: <craig at ctdedo.com>
USA
Linked-In: http://www.linkedin.com/in/craigdedo
-----Original Message-----
From: j3-bounces at j3-fortran.org [mailto:j3-bounces at j3-fortran.org] On Behalf
Of Bill Long
Sent: Tuesday, October 27, 2009 14:05
To: Van.Snyder at jpl.nasa.gov; fortran standards email list for J3
Subject: Re: (j3.2006) Compilers disagree
Van Snyder wrote:
> My compilers disagree concerning whether this is legal:
>
> subroutine before ( A, N )
> implicit NONE
> real A(N)
> integer N
> end subroutine before
>
> I thought the declaration for N had to precede its use in the
> declaration for A, but I can't find the relevant requirement.
>
> Is it there, or am I imagining it?
>
How about [151:3-6] in 09-007r3 (in the section on rules for
specification expressions).
Cheers,
Bill
--
Bill Long longb at cray.com
Fortran Technical Support & voice: 651-605-9024
Bioinformatics Software Development fax: 651-605-9142
Cray Inc., 1340 Mendota Heights Rd., Mendota Heights, MN, 55120
_______________________________________________
J3 mailing list
J3 at j3-fortran.org
http://j3-fortran.org/mailman/listinfo/j3
More information about the J3
mailing list