> I'm not so sure about the legality of it as it stands. I was going to
> say that it is illegal because x isn't a dummy argument of the current
> scope. Just because x is inherited, that doesn't necessarily mean
> that you could do PRESENT(x). I'd have guessed it to be illegal...
Hi,
I would have said the code should be illegal to avoid the kinds of things
Van Snyder talked about. I just wanted to say that in this case there is a
good reason not to pass this argument to the internal procedure (not only
because this require a branch to check whether the argument is present in
the top function). Namely, the procedure was a QuickSort and the internal
procedure was the recursive core body, which should have as little arguments
as possible to minimize the stack space.
Anyway, for this case there is a much nicer solution, namely, just declare a
logical indicator present_x in the top function and say:
present_x=PRESENT(x)
and then use this indicator in internal subprograms if you wish. I should
have coded this this way in the first place...
Aleksandar
_____________________________________________
Aleksandar Donev
http://www.pa.msu.edu/~donev/
[log in to unmask]
(517) 432-6770
Department of Physics and Astronomy
Michigan State University
East Lansing, MI 48824-1116
_____________________________________________
|