13-283 To: J3 From: Reinhold Bader, Bill Long, Malcolm Cohen Subject: Dummy arguments of assumed type and size Date: 25 June 2013 References: N1942, 13-261 1. Introduction --------------- It is a requirement of the user community that a dummy argument which is assumed-type assumed-size can be associated with a scalar actual argument. That functionality is not provided by TS 29113 as published. Furthermore, the semantics in TS 29113 for character actual arguments being associated with an assumed-type assumed-size dummy are poorly specified, as the number of elements in the dummy is the number of elements in the actual times the character length of the actual divided by the character length of the dummy, and the dummy does not have any character length. these problems should be fixed in any corrigendum to TS 29113, and in any case as an integration issue in Fortran 2015. This paper replaces part (D) of 13-261. 2. Edits to 10-007r1 -------------------- In addition to the edits in TS 29113 subclause 9.7: [294:28] 12.5.2.4p13 rewrite: - split the first sentence into a separate paragraph - replace the rest with a new paragraph "If the actual argument is a noncoindexed scalar, the corresponding dummy argument shall be scalar unless \begin{itemise} \item the actual argument is default character, of type character with the C character kind (15.2.2), or is an element or substring of an element of an array that is not an assumed-shape, pointer, or polymorphic array, \item the dummy argument has assumed rank, or \item the dummy argument is an assumed-type assumed-size array. \end{itemise} {Allow scalar to associate with an assumptive dummy.} [298:30] 12.5.2.11p1, after "represents an element sequence if" change "it" to "the dummy argument is not assumed-type and the actual argument". {If the dummy argument is assumed-type, we don't have traditional sequence association - especially in the case of character, otherwise we get a divide by NaN trying to calculate the number of elements.} [299:g+] 12.5.2.11p4+, insert new paragraph "If an assumed-type dummy argument is an assumed-size array and the actual argument is scalar, the dummy array has exactly one element. Otherwise, an assumed-type assumed-size dummy array has the same number of elements as the actual argument." {New thingo semantics in "sequence" association.} ===END===