Re: Pointers to functions: Is this the right [f03] syntax?



Andy <andyv@xxxxxxxxxxxxxx> wrote:

I've made a couple fixes and the current g95 can compile and run this
code fine now. I am worried that things may be a little too loose in
that the pointer p in the original code points to a subroutine, then
later on a function,

I don't see that in the code posted here, though I suppose it might be
so in the prior posting to gg95 (I don't often read that group).

I can't seem to find anything prohibiting
that. Did I miss something?

I'd have to see the code (as mentioned above, I don't see anything like
that in the posting here). But I guess even then, I wouldn't be sure.
Seems to me I recall some debate on related questions (even without
pointer involvement - might have been dummy args, which are like
pointers in some senses). I'm not sure whether it was definitively
answered.

I can give a definitive answer as to my opinion of a coding practice
that would do that, but that's a different question. :-)

--
Richard Maine | Good judgment comes from experience;
email: my first.last at org.domain| experience comes from bad judgment.
org: nasa, domain: gov | -- Mark Twain
.



Relevant Pages

  • Re: (Yet another) EQUIVALENCE problem in modules and common blocks
    ... Not that pointers will not work if the equivalence is used for type ... allocatables or pointer. ... original code was really doing. ... array than needed as an actual argument. ...
    (comp.lang.fortran)
  • Re: C conditional statement shorthand puzzle -- please help!!
    ... You understand how the conditional operator "?:" works, ... either arithmetic or pointer) expression can be used ... operator in the original code, and in an if statement in the ... Personally, unless B is being used just as a Boolean value, I'd write ...
    (comp.lang.c)
  • Re: Elucidation Needed
    ... reasons can be right. ... The reason I can't be right is that the pointer I suggested was out of ... This could explain what happens in the original code because winentry- ... is used in storing the return value, ...
    (comp.sys.acorn.programmer)
  • Re: [PATCH] autofs4 - panic after mount fail
    ... fput() doesn't check its argument for a NULL pointer, ... so the original code shouldn't hurt and should give you an extra bit of ...
    (Linux-Kernel)
  • Re: [PATCH] autofs4 - panic after mount fail
    ... fput() doesn't check its argument for a NULL pointer, ... so the original code shouldn't hurt and should give you an extra bit of ...
    (Linux-Kernel)