[ To avoid confusion: this is the same message that I just posted to
comp.lang.fortran. ]
Much to my chagrin, I learned recently, that PURE and ELEMENTAL
procedures in Fortran95 and HPF must not do any I/O, not even
PRINT or WRITE(unit=*).
This begs two questions:
1) What is the reason for this? It is obvious that general I/O is a
bad thing in a PURE procedure. However, an ability to write
warnings and error messages to the standard output would still
make a lot of sense.
2) What are people using for debugging PURE procedures? Simply
removing the keywords RURE and ELEMENTAL with a preprocessor does
not help, because the procedures may be required to be PURE or
ELEMENTAL in their context (e.g. FORALL).
I am aware that some compilers offer I/O in PURE procedures out of
leniency or as an extension, but I'm interested in a standard
conforming solution.
Cheers,
-Thorsten
--
Thorsten Ohl, Physics Department, TU Darmstadt -- [log in to unmask]
http://crunch.ikp.physik.tu-darmstadt.de/~ohl/ [<=== PGP public key here]
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|