Re: pure procedure



On 04/23/2011 01:33 PM, Aris wrote:
Daniel Carrera<daniel@xxxxxxxxx> wrote:
On 04/23/2011 11:21 AM, Daniel Kraft wrote:
Overall I agree though, that it really would be nice to have debugging
output possible from PURE procedures. I also frequently use output for
debugging, and would surely use PURE more liberally and often (and would
like to do so) if this would not restrict me there.


I sympathize, because I use pure and elemental procedures everywhere in
my code. It *does* make debugging more difficult.

Attributes, like "PURE" are easy to pre-process out and in again,
even with sed. Just put a recognizable comment at the end of the line.

It's a bit less straight forward if the procedure is ELEMENTAL, or if you have procedure A that calls B that calls C that calls D and you want to put the diagnostic in D.
.



Relevant Pages

  • Re: pure procedure
    ... can speed up debugging in large programs. ... If you see a PURE ... lying to the compiler and tricking it into believing your ... lies, as the OP was suggesting, completely defeats that object. ...
    (comp.lang.fortran)
  • Re: pure procedure
    ... output possible from PURE procedures. ... It *does* make debugging more difficult. ... But as I've said earlier, there are reasons why printing is prohibited, this is not just a random idea that the Fortran committee just had. ...
    (comp.lang.fortran)
  • Re: pure procedure
    ... On 04/22/2011 08:56 PM, Richard Maine wrote: ... can speed up debugging in large programs. ... Nobody forces you to use pure procedures. ... presumably it's because you *want* the assurance of a side-effect free procedure. ...
    (comp.lang.fortran)
  • Re: pure procedure
    ... Daniel Carrera wrote: ... output possible from PURE procedures. ... It *does* make debugging more difficult. ...
    (comp.lang.fortran)
  • Re: INTERFACE OPERATOR problem
    ... intended to avoid an implementation complication, ... procedure call a pure one. ... ELEMENTAL MyFunc(x) ... Now I do not question the utility of ELEMENTAL procedures that are also ...
    (comp.lang.fortran)