(j3.2006) Compilers disagree

dick.hendrickson at att.net dick.hendrickson
Tue Oct 27 17:17:05 EDT 2009


 
  -------------- Original message from Robert Corbett <Robert.Corbett at Sun.COM>: --------------


> dick.hendrickson at att.net wrote:
> > 
> >  I think it's paragraph 7 on the top of page 151 in specification 
> > expressions.
> > 
> > Dick Hendrickson
> 
> I agree that covers the case and the code fragment is not
> standard conforming.  Because the restriction is not a
> constraint, there is no requirement for a standard-conforming
> processor to diagnose the nonstandard usage.

Maybe.  I think paragraph 4 on 109 (F2008) says that N has no type
when the REAL statement is encountered.  But R728 says that
the specification expression must be an integer expression.  That's
not a strong argument.  But the intent of implicit none was to force
compile time errors when an undeclared variable was encountered.
Using a variable with "no type" violates most of the expression
syntax rules.  

Dick Hendrickson


> 
> Bob Corbett
> 
> >     -------------- Original message from Van Snyder
> >     : --------------
> > 
> > 
> >      > 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?
> >      >
> >      > --
> >      > Van Snyder | What fraction of Americans believe
> >      > Van.Snyder at jpl.nasa.gov | Wrestling is real and NASA is fake?
> >      > Any alleged opinions are my own and have not been approved or
> >      > disapproved by JPL, CalTech, NASA, the President, or anybody else.
> >      >
> >      > _______________________________________________
> >      > J3 mailing list
> >      > J3 at j3-fortran.org
> >      > http://j3-fortran.org/mailman/listinfo/j3 
> > 
> > 
> > ------------------------------------------------------------------------
> > 
> > _______________________________________________
> > J3 mailing list
> > J3 at j3-fortran.org
> > http://j3-fortran.org/mailman/listinfo/j3
> 
> _______________________________________________
> J3 mailing list
> J3 at j3-fortran.org
> http://j3-fortran.org/mailman/listinfo/j3
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://j3-fortran.org/pipermail/j3/attachments/20091027/f78293b1/attachment-0001.htm>



More information about the J3 mailing list