12-195 To: J3 From: Van Snyder Subject: For consideration for next revision Date: 16 October 2012 1. Changes recommended in interpretations ------------------------------------------ Interpretation F08/0038 recommended to change the specifications of intrinsic procedures that have optional DIM arguments that aren't really optional. F08/0061 suggested to insert a note. 2. Inconsistent or incomplete features --------------------------------------- A type-bound procedure cannot be a or an actual argument. In R740 and R1223, and should be , with appropriate adjustment of C729 and C1235. Would avoid need for SELECT TYPE construct, provides same future-proofing as SOURCE= and MOLD= in ALLOCATE. A in a cannot be an intrinsic procedure, a dummy procedure, or defined by an internal subprogram. C465 should be more like C729. A procedure declaration statement can specify an explicit interface, but cannot appear in an interface block. Allow a procedure declaration statement, including one with the POINTER attribute, in an interface block, provided it specifies an explicit interface. A GENERIC statement within a type definition specifies a generic identifier for a set of specific type-bound procedures. It would be useful if a GENERIC statement not within a type definition could specify a generic identifier for a set of non type-bound specific procedures that have explicit interfaces. See 04-187. One can, but need not, specify component names for namelist input, if the component values are input in component order. Namelist output is required merely to be consistent with input, so whether a processor outputs or does not output component names is processor dependent. It would be useful to have a changeable mode to control this. See 04-203. One cannot put an on a , but one can put one on a . One cannot put an on an ENUM or ENUMERATOR statement. 3. Aggravating pointless restrictions -------------------------------------- Procedures that define assignment or operations cannot have optional arguments. Allow subroutines that define assignment to have more than two arguments, so long as those after the first two are optional. Allow functions that define operators to have more more than two arguments, so long as any after the second are optional. If the second is optional, the function can be used for both binary and unary operations. Generic resolution rules already work for optional arguments. See 04-169. Different kinds of characters cannot be concatenated. Allow ISO 10646 and ASCII characters to be concatenated, with the result being ISO 10646. See 04-194. Non-default kind characters cannot be character string edit descriptors. See 2.11.6.2 in JPL-wishlist-2012.pdf in the Tutorials folder on the server. SIZE= requires ADVANCE= with a value of "no". Remove requirement for ADVANCE=. See 04-204. Subscript triplets can have strides, but CASE selectors cannot. See 04-157. Cannot inquire KIND(x%a%b%c) (or HUGE, TINY, EPSILON...) if both a and b are arrays, or if either is a disassociated pointer, or a deallocated allocatable. See 2.7.6.1 in JPL-wishlist-2012.pdf in Tutorials folder on the server. Can't specify substrings of character arrays. See 2.10.6 in JPL-wishlist-2012.pdf in Tutorials folder on the server. Allocatable components are prohibited in I/O lists. Would be better to require they're allocated. Error termination of a program during output undefines an entire file, not just records being written. A specification function cannot have a dummy procedure. It's sufficient that an actual procedure associated with a dummy procedure in a specification inquiry not be internal to the same instance of the scoping unit as the declaration that references it (so it can be a dummy procedure of a recursive procedure), and not be a procedure pointer (because its target might be in the same scoping unit). Adjust 7.1.11p2(11) and 7.1.11p5. 4. Easy extensions ------------------- People ask repeatedly for IMPLICIT NOEXTERNAL. See 04-176. Turning a character string into an array is trivial. Turning a character array into a string isn't. Extend PRODUCT to do this, use unary prefix // on an array, or specify a new intrinsic function. See 2.10.5 in JPL-wishlist-2012.pdf in Tutorials folder on the server. Caseless INDEX, SCAN, VERIFY, at least for ASCII kind. UPPER_CASE and LOWER_CASE, at least for ASCII kind. Allow named constant declarations within type definitions. These declare names that can be accessed using a%b syntax (unless they're private), but, like type parameters, cannot appear in variable-definition contexts. Unlike other components, they can be used for bounds or type parameter values within the same type definition. See 04-162. Allow USE statements within type definitions. All they do is make names accessible within the type definition. These don't declare names that can be accessed using a%b syntax, but could access procedures to be type bound, or named constants to be used for bounds or type parameters or to declare named constants. See 04-207. 5. A little bit harder ----------------------- Non-elemental PTR_MERGE MERGE and PTR_MERGE should have lazy evaluation semantics in non-elemental case. DOT_PRODUCT(A,B[,C,...]) == SUM(A*B[*C...]) MATMUL(A,B[,C,...]). Otherwise (2n)!/((n+1)!n!)-way if-block needed. OUTER_PRODUCT Resolve generic without invoking a specific, or evaluating arguments, so that the resolved specific can be an actual argument or procedure pointer target. See 06-110. Allow generic procedure declarations to be partial applications. See 04-168r1. 6. Stuff that was desirable but didn't make cut in 2004 -------------------------------------------------------- Change "appear" to "present" for statement specifiers in I/O, ALLOCATE, etc., to avoid combinatorial explosion of if-block. See 04-180. 7. Aggravating problems with nontrivial solutions -------------------------------------------------- Cannot use UBOUND for an array of rank>1 as a specifier for all dimensions of an array. See 04-196. Cannot use result of FINDLOC as a subscript. See 04-195.