Petros Dafniotis, DuPont Central R & D writes:
> It is my understanding that you cannot have a POINTER attribute to a character
> dummy argument declared with the (LEN=*) length specifier. I was unable to
> find the reference for that in my F90 ISO standard though...
I'm not sure what would support a restriction against that. My first
inclination would be that it would be ok, but I haven't spent the time
to research that enough to be sure. I vaguely recall discussion of
this at some time. But I don't recall the results of the discussion
in detail.
> in the program -again to my understanding- is that NULLIFY() (or a pointer
> association statement) has to be used on all pointer objects before you
> can reference them;
You have this a bit confused. Yes, a pointer must be associated
before you can reference it. *BUT* 2 points.
First, nullify() specifically makes a pointer disassociated. Thus,
not only don't you have to use nullify before referencing a pointer,
is is illegal to use nullify on a pointer and then imediately
reference it.
Second. Perhaps part of the problem is just your use of the term
"reference". This term has a very specific meaning in the language
standard. And in particular, passing a pointer as an acutal argument
to a pointer dummy argument does not constitute a reference anyway. I
know of no restriction that says you need to nullify a pointer before
using it like this.
I didn't save the original code to see whether the subroutine does
anything that fails when the argument has undefined association
status. In that case, a nullify might in fact be needed. But you
don't need one just in order to pass the argument.
--
Richard Maine
[log in to unmask]
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|