To: J3 12-183r5 From: Dan Nagle Subject: Minor Features List for f1x Date: 2012 October 19 This paper is to start the list of suggestions for topics to be considered as "warts" to be addressed in Fortran 1x, in furtherance of WG5's plans for future development. It is subgroup's intention that the items discussed below be discussed in plenary for suitability as work items, and that these items be removed if found to be inappropriate, and that other items be added when found to be consistent with WG5's Markham resolutions. This is a meeting document rather than a standing document as the next meeting of J3 must write a final list for forwarding to WG5 by the next meeting of WG5. Hereinafter, Appropriate/Inappropriate/Undecided is A/I/U Item 1 The g0 edit descriptor had a ".d" added in response to public comments as a part of Fortran 2008. The requirement is that ".d" (where is this stated in 10-007r1 ?) be absent when the list item is not real or complex should be eliminated to make it optional and/or ignored when the list item is not real or complex. A specific behavior should be selected for interpretation of ".d" when used with g0 and the list item is of type integer, logical, or character. Straw Vote: Is this appropriate for inclusion in f1x? A/I/U = 6/0/1 => Yes, this makes g0 more useful Straw Vote: If so, what is the behavior of g0.d in all cases? No straw vote was taken; this discussion is deferred. Item 2 An attribute that requires a separate instance of a local entity for each instance of a procedure would be useful when a pure procedure is referenced from a do concurrent. Also, it would provide documentation for local entities in recursive procedures. Many processors support an automatic declaration now. Adding this to the standard would therefore promote portability of programs and reduce diagnostics when standards-conformance-checking has been selected. Straw Vote: Is this appropriate for inclusion in f1x? No straw vote was taken but this item was discussed. No, this is unnecessary. Please see 12.6.2.4p1 pg. 308 of 10-007r1. Item 3 Many edit descriptors have w=0 meaning a "minimum width" field. When a character is printed using 'a' format, often the trim() intrinsic is applied. Since trim() is transformational, it cannot be applied to a whole array, but must be applied to each element individually. Thus, a format descriptor that means "trim the character item and then apply 'a' format" would be useful. This might be called 'a0'. Straw Vote: Is this appropriate for inclusion in f1x? A/I/U = 4/1/2 => Yes, this gives a useful meaning to a0 Item 4 Processors are required to have the ability to report the appearance of an intrinsic procedure not described in the standard. Fortran 2003 added intrinsic modules. Processors are not required to report the use of non-standard intrinsic modules, nor of non-standard entities from standard intrinsic modules. Doing so would aid standards-conformance checking of programs. Straw Vote: Is this appropriate for inclusion in f1x? A/I/U = 7/0/0 => Yes, this will aid standards checking of programs Item 5 Nested scopes were expanded greatly with f90, and further with f95, f03 and f08. But there is no means to control host association except declaration of a similarly-named entity in the nested scope (at least, for most nested scopes). Thus, a means to specify that a name, names, or all names from the host are not to be available within the nested scope would be helpful. Straw Vote: Is this appropriate for inclusion in f1x? A/I/U = 4/0/2 => Yes, this is requested of vendors Item 6 Interpretation request F08/0038, referencing paper 10-187r1 from meeting 192, requests that specification of DIM= arguments of several intrinsic procedures should be made consistent. This would be helpful to readers of the standard and make the standard's intentions clearer. Straw Vote: Is this appropriate for inclusion in f1x? A/I/U = 6/0/1 => Yes Item 7 An interface block is needed to declare a generic name and its associated specific names in general (that is, outside a type definition). Within a type definition, a generic statement performs the same specification. Allowing a generic statement in more places would be a syntactic convenience. Please see 04-187 for more. Straw Vote: Is this appropriate for inclusion in f1x? A/I/U = 5/0/2 => Yes Item 8 Currently, access control for enumerators requires repetition of the list of names. Allowing access control for enumerators without requiring the repetition of the list of names would be convenient. This might be merely allowing an access-specification on an enumerator statement. Straw Vote: Is this appropriate for inclusion in f1x? A/I/U = 4/0/3 => Yes Item 9 Currently, characters of different kinds may not be concatenated. Allowing a "smaller" (ASCII) character to be concatenated with a "larger" (ISO 10646) character, at least where the smaller character is a subset of the larger character (as is the case with ASCII and ISO 10646), with the result being the larger character, would parallel the case where ASCII is assigned to ISO 10646. Straw Vote: Is this appropriate for inclusion in f1x? A/I/U = 3/2/2 => Needs more discussion Item 10 Currently, there is no way to require explicit specification of the external attribute. Providing such a means would aid program checking. Straw Vote: Is this appropriate for inclusion in f1x? A/I/U = 5/1/1 => Yes, it will assist program checking Item 11 The norm2 intrinsic procedure computes the norm of an array. In some calculations, a weight array should be applied. When a dot product is computed, the weight array may be simply multiplied element-wise by one of the input arrays. With norm2, the square root would be applied, which could be computationally expensive (if it cannot be reused enough) or tedious (especially when the weight array has negative elements). So a weight argument could be added to norm2. Straw Vote: Is this appropriate for inclusion in f1x? A/I/U = 1/4/2 => No, little-used routine Item 12 It is processor-dependent whether images share the state of the random_number intrinsic procedure, yet some calculations require an independent stream of random numbers for each portion of the calculation. Thus, provide a stream argument to select which stream, up to a processor-dependent maximum number, is to supply the next random number. A processor could also choose to provide a very-good-but-slower stream and a faster-but-not-quite- so-good stream. Straw Vote: Is this appropriate for inclusion in f1x? A/I/U = 1/6/0 => No, applications use their own rng's