> I'd like to see READONLY for module data, too. Certainly,
> if a compiler can support PARAMETERs, it can support READONLY.
> What's the point? It doesn't expose any further optimization
> opportunities.
I don't think optimisation is the main motivation, but rather error
checking.
> So, the only reason left for READONLY is error checking, to flag when I
> might have inadvertently modified a variable.
Exactly.
> While this is nice, I'm not
> sure it justifies the addition.
Well, the integrated effect of IMPLICIT NONE, equivalent compiler
switches, warnings of used before set from ftnchek, equivalent compiler
switches etc must be pretty large by now (at least to the people who use
them) so I think there's nothing wrong with more error checking.
This is especially important if you write a MODULE to be USEd by someone
else's code. READONLY for module data seems as logical as the
introduction of READ only files in F90.
> Note that INTENT provides information to the compiler which it truly can
> use in optimization, so it is more useful.
INTENT is for arguments, not for MODULE variables, so, while it's
useful, it's really a separate issue.
--
Phillip Helbig Email ......... [log in to unmask]
Nuffield Radio Astronomy Laboratories Tel. .... +44 1477 571 321 (ext. 297)
Jodrell Bank Fax ................ +44 1477 571 618
Macclesfield Telex ................ 36149 JODREL G
UK-Cheshire SK11 9DL Web ... http://www.jb.man.ac.uk/~pjh/
My opinions are not necessarily those of NRAL or the University of Manchester.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|