>>>>> Jack Scheible <[log in to unmask]> writes:
> Actually, I favor the default SAVE of ALL variables. This was the
> case with FORTRAN 77, and the change in Fortran 90 has caused me no
> end of headaches. ANSI Standard FORTRAN 77 code may compile in
> Fortran 90, but you cannot trust it to work the same.
That's wrong
8.9 SAVE Statement
[...]
The execution of a RETURN statement or an END statement within a
subprogram causes all entities within the subprogram to become
undefined except for the following:
1.Entities specified by SAVE statements
2.Entities in blank common
3.Initially defined entities that have neither been redefined nor become undefined
4.Entities in a named common block that appears in the
subprogram and appears in at least one other program unit
that is referencing, either directly or indirectly, that subprogram
(from http://www.fortran.com/fortran/F77_std/rjcnf0001-sh-8.html#sh-8.9)
Many compilers did SAVE automatically, but it was not required by the
standard.
--
Thorsten Ohl, Physics Department, TU Darmstadt -- [log in to unmask]
http://crunch.ikp.physik.tu-darmstadt.de/~ohl/ [<=== PGP public key here]
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|