Print

Print


--On Wednesday, September 1, 2004 9:35 AM +0100 Clive Page
<[log in to unmask]> wrote:

> So I think that with g77 you have to use a separate DATA statement (the
> SAVE then is superfluous).

Please note that the SAVE is *NOT* superfluous in standard f77.  It is
superfluous in f90, but that feature is new to f90.  And even in f90,
it isn't particularly related to DATA statements.  In f90, the effect
of initialization in the type declaration and in a DATA statement is
identical.  The syntax is different, and the DATA statement syntax allows
you to do partial initialization, but the meaning of the initialization
and the effects on things like SAVE are identical.

If you are talking about g77 instead of standard f77, then I recommend
not counting on it anyway.  That would be relying on the behavior or a
particular f77 compiler.  For issues where it is impossible or very
awkward to stick to the standard, I do whatever I have to do to get the
job done, but I recommend against assuming compiler-specific behavior
when the standard solution is as simple as adding a SAVE declaration.

--
Richard Maine                |  Good judgment comes from experience;
[log in to unmask]       |  experience comes from bad judgment.
                             |        -- Mark Twain