Subject: Inquiry function inconsistencies J3/01-177r1 From: Kurt W. Hirchert (Meeting 156) 22 Mar 2001 ======== Overview ======== While reviewing some of its other work, /DATA noticed that there were gratuitous inconsistencies among the inquiry functions in their ability to operate on allocatable objects not allocated and pointers with undefined or disassociated association status. They also differed from what is allowed for inquiries using the designator%type-param-name notation. This paper attempts to regularize these rules and centralize their statement. ===== Edits ===== [73:27-28] "that is ... allocation status"->"as specified in 13.1" [73:32-33] "that is ... association status"->"as specified in 13.1" { Replace incomplete description with reference to real rules. } [255:30] "If"->"Except in references to intrinsic inquiry functions, if" [255:32+] Also perform above edit on text added by 01-103r1. { This adds an acknowledgement of the exception for inquiry functions to the statements of the general rules for all procedures. } In the interests of consistency, it is desirable that the same phrase be used each time to describe the case that is handled differently for intrinsic inquiry functions -- "an unallocated allocatable or a pointer that is not associated". In the interests of brevity, this will be abbreviated NOTTHERE in subsequent edits. The editor is asked to expand this abbreviation when doing the edits. [275:27] Insert new sentence: "Unless the description of an inquiry function states otherwise, its primary argument is permitted to be NOTTHERE." { This places a general statement of the exception in the description of inquiry functions. } [277:16] Delete middle sentence. {Now redundant} [277:39-43] Delete all but first sentence. {Now redundant} [279:15-18] Delete. {Now redundant} [279:33-35] Move to 280:19+ and "the"->"these" {Better placement} [280:20-21] Delete. {Now redundant} A small number of inquiry functions now need a stronger limit: Inquiries related to the type of a polymorphic object need "If it is a pointer, it shall not have undefined association status." abbreviated NEEDTYPE below. Inquiries related to the bounds of an array need "It shall not be NOTTHERE.", abbreviated NEEDBOUNDS below. LEN needs a specific variant on the requirements used for the parameter inquiry notation. [302:39,40] Add NEEDTYPE (twice) {for EXTENDS_TYPE_OF} [310:29-30] Replace final sentence with NEEDBOUNDS. {for LBOUND} [311:14-15] Replace final sentence with "If it is NOTTHERE, it shall not have a deferred length type parameter.". {for LEN} [328:36,37] Add NEEDTYPE (twice) {for SAME_TYPE_AS} [331:28-30] Replace penultimate sentence with NEEDBOUNDS. {for SHAPE} [332:34-35] Replace sentence with NEEDBOUNDS. {for SIZE} [337:25-26] Replace sentence with NEEDBOUNDS. {for UBOUND} - end -