(j3.2006) Variable definition context

Malcolm Cohen malcolm
Wed Apr 2 02:54:01 EDT 2014

Van Snyder writes:

>16.6.7p1(12) "Variable definition context" says
>"(12) an actual argument in a reference to a procedure with an explicit
>interface if the corresponding dummy argument has INTENT (OUT) or INTENT
>is a variable definition context.
>Do we want that to be the case if the actual argument and dummy argument
>are both pointers?

Yes.  Note that pointer assignment, allocation, deallocation, and nullification 
all appear on this list, so it is clearly intentional.

>If they are both pointers, the fourth item in the list in 16.6.8p1
>"Pointer association context" says it's a pointer association context,

Right, it is both in this case.

>using slightly different words:
>"an actual argument in a reference to a procedure if the associated
>dummy argument is a pointer with the INTENT (OUT) or INTENT (INOUT)
>This probably ought to
[use "corresponding" not "associated"]

I agree.  This is such a minor editorial item I've just added it to my draft 

>16.6.7p1 "Variable definition context" also has
>"(2) a pointer-object in a nullify-stmt;
>"(3) a data-pointer-object or proc-pointer-object in a
>Are these really variable definition contexts, or are they pointer
>association contexts?

Yes and Yes.

>That these are now variable definition contexts

I think these were always variable definition contexts.

> makes it impossible to
>have a meaningful pointer of type EVENT_TYPE or a type that has a
>component of type EVENT_TYPE (C602-C603 in the TS), or one of type
>LOCK_TYPE or a type that has a component of type LOCK_TYPE (C1303-C1304
>in 14-007).

There are severe limits on this anyway (you are not even allowed to have a named 
pointer of type LOCK_TYPE for example).  Actually I suspect the limits are more 
likely to be not severe enough rather than too severe...

Since events and locks are for inter-image communication, and POINTER does not 
work inter-image, I think you should not be allowed to have pointers of those 
types full stop.

>[488:23-24 C.4.4] says "where a pointer appears in a variable-definition
>context the variable that is defined is the target of the pointer." This
>certainly cannot be the case in 16.6.7p1(2-3).  This needs to be
>repaired if 16.6.7p1(2-3) are not moved to 16.6.8.

C.4.4p1 is broken anyway, since variable-definition context includes 
undefinition which C.4.4 does not admit to.  And its first sentence has nothing 
to do with the topic (but has to do with the topic of C.4.3!).

As far as I am concerned the entirety of C.4 adds nothing to the standard and 
could profitably be removed.  It was useful in F90 and in F95, but not since.

>The list in 16.6.7 "Variable definition context" is enumerated.  The one
>in 16.6.8 "Pointer association context" is itemized.  Should they be the
>same style?  ISO apparently prefers itemized, but enumerated makes for
>easier reference.

Ease of reference is only germane for big long lists.  I see no problem with us 
continuing to enumerate big long lists and itemise short ones.

................................Malcolm Cohen, Nihon NAG, Tokyo. 

More information about the J3 mailing list