>
> It is a poor compiler that does not tell you when you violate the
> standard.
>
>
> > No. A PROGRAM that relies on this is not standard conforming,
> > but the compiler is.
>
> > ===
> > Thus, I conclude that a compiler that automatically SAVEs variables,
> > and allows them to be referenced without being redefined, does NOT
> > conform to the FORTRAN 77 standard.
> > ===
>
>
Silly example I know but what about ( untested ... )
Subroutine circle_area( r, initialize, area )
Implicit None
Real , Intent( In ) :: r
Logical, Intent( In ) :: initialize
Real , Intent( Out ) :: area
Real, Save :: pi
If( initialize ) Then
pi = 4.0 * atan( 1.0 )
End If
area = pi * r * r
End Subroutine circle_area
Has to be a clever compiler to work out if the first call
has initialize set to true !
Ian
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|