J3/01-225 Date: 30th May 2001 To: J3 From: Malcolm Cohen Subject: Unresolved issue 327 1. Introduction Issue 327 says, apropos of the NULL intrinsic "This does not seem to have been updated to account for deferred type parameters." An edit is supplied to make this clearer. It is, in my opinion, not exactly crystal clear in 7.1.4.1 either - in fact very similar words have been used. 2. Discussion And why is the basic functionality of NULL() explained in 7.1.4.1 instead of in chapter 13? This seems silly. For a start, a requirement on the intrinsic NULL as an actual argument obviously belongs in chapters 12, 13 or 14, not chapter 7. For another, 7.1.4.1 and 13.11.84 actually contradict one another, due to the passage of time (one having been updated without the other). Here I'm referring to the description of what NULL() does; compare [117:28-30] (the correct version) with [321:30] (the incomplete version). Obviously we should do this in one place rather than two, since we have indeed ended up with the situation that they are both incomplete/incorrect. I'll propose edits to move this to ch 13, leaving behind a forward reference noting the potential context dependence of the type etc. of NULL. While we're at it, we may as well fix the incorrect assertion that a disassociated pointer "has no shape". This is palpably wrong for scalar pointers (the shape is a zero-sized array, and zero-sized arrays are always defined!). 3. Edits to 01-007r1 to fix the J3 note [321:36] Append "If MOLD has deferred type parameters, those type parameters of the result are deferred." {NOTE TO EDITOR: This edit is replaced if we do section 4.} [321:37-39] Delete J3 note 327. 4. Edits to 01-007r1 to improve NULL() exposition [117:28] Delete "The ... (13.11.84)". [117:28-30] Capitalise "returns", and move the sentence as edited to [321:30], replacing the existing description of NULL(). [117:30-31] Replace "A disassociated ... rank." with "A disassociated array pointer or an unallocated allocatable array has no shape but does have rank. The type, type parameters and rank of a reference to the NULL intrinsic function may depend on context (13.11.84)." {Rewording the first sentence to correct the shape assertion, and leaving behind an indication that the type etc. of NULL may depend on context with a forward reference.} [117:31-33] Delete "The ... 7.2." {We'll reword this when we insert it into 13.11.84.} [117:34-117:45] Move to [321:36+], changing the table number from 7.2 to 13.x. [118:1-3] Delete. {We'll reword this when we insert it into 13.11.84.} [118:4-17] Move to [322:4+] as a new paragraph, un-notifying it and changing "For example" to "The MOLD argument is required in the following:" [321:30] Replace the description with the edited sentence from [117:28-30], viz "Returns a disassociated pointer, designates an unallocated allocatable component of a structure constructor, or designates a deferred type-bound procedure binding." [321:35-36] Replace "The ... (7.1.4.1)." with "If MOLD is present, the characteristics are the same as MOLD. If MOLD has deferred type parameters, those type parameters of the result are deferred. If MOLD is absent, the characteristics of the result are determined by the entity with which the reference is associated: see table 13.x. MOLD shall not be absent in any other context. If any type parameters of the contextual entity are deferred, those type parameters of the result are deferred. MOLD shall be present when the context is as an actual argument in a reference to a generic procedure if the type, type parameters, or rank is required to resolve the generic reference." {Reword existing text, add deferred type parameter stuff, and incorporate stuff from 7.1.4.1 with rewording.} [321:36+] Insert table and text from [117:34-118:3] as described above. [322:1-2] Replace result description with "The result is a disassociated pointer, an unallocated allocatable entity, or a deferred type-bound procedure binding." [322:4+] Insert additional example from [118:4-17] as described above. ===END