(j3.2006) 12-108

Malcolm Cohen malcolm
Fri Jan 27 00:39:11 EST 2012


Question (1) is not standard-conforming, as the procedure pointer is undefined; 
a procptr to an internal procedure goes undefined on return from its host 
instance (item (7) of 16.5.2.5).

Question (2) is not standard-conforming, as a procedure name is not a valid 
primary in a restricted expression.  You can call a specification function, but 
you cannot pass one as an argument in a restricted expression (no reference - 
just go through the list of valid primaries - it's not there, object designators 
designate data objects not procedures).

Question (3) is standard-conforming and not problematic, as the Q argument is 
associated with the uplevel instance of the subprogram it is not the internal of 
the subprogram invoked (if you follow my drift).

I believe we have in fact caught all the problematic cases here - a problematic 
case being one that invokes an internal procedure of the subprogram instance 
being created.  An internal procedure of some other subprogram instance is not 
problematic in any way, though it might be confusing to the programmer - I 
certainly would not recommend that style!

Van might want to ponder whether he wants to revise this paper... (or I will, 
and it will have a very short answer section and no edits).

Cheers,
-- 
................................Malcolm Cohen, Nihon NAG, Tokyo. 




More information about the J3 mailing list