I also think that default save is somewhat counter-intuitive, and that the
F90 style syntax makes it worse. Many novices would think that something
like this:
SUBROUTINE something
INTEGER :: counter = 0
would achieve the effect that the counter starts at zero each time you
call the routine (especially because similar syntax does just that in
several other languages). When one used to have to use DATA its rules
were peculiar enough that one could (just) remember that it took effect
just once, effectively at compile-time, whereas now, it's harder, I think.
Unfortunately I think that it would cause a lot of complaints about lack
of backward compatibility if this default were to change. My feeling is
that the only way to do this would be to introduce yet another attribute,
which means "don't use static storage for this value", e.g.
INTEGER, VOLATILE :: counter = 0
Maybe that choice of keyword name isn't ideal, others may be able to think
of something better.
Regards
--
Clive Page, Internet: [log in to unmask]
Dept of Physics & Astronomy,
University of Leicester, Phone +44 116 252 3551
Leicester, LE1 7RH, U.K. Fax +44 116 252 3311
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|