To: J3 J3/20-122 From: Dan Nagle & Steve Lionel Subject: Edits for US14 (auto-allocate characters) Date: 2020-February-27 Reference: 19-252r2, 18-007r1 1. Introduction --------------- Paper 19-252r2 provided specifications and "example" edits to 18-007r2. 252r2 passed at 220. From the minutes, it appears that only the specs were moved and passed. There is no new syntax. Edits are below. Both statements and intrinsics return message strings. The affected intrinsics are: co_broadcast, co_min, co_max, co_reduce, co_sum, date_and_time, execute_command_line, get_command, get_command_argument, get_environment_variable, and move_alloc. 2. Edits to 18-007r1 -------------------- { edits in page order } { put remarks briefly describing the new features in Introduction } [xiii] { in the bullet item Data usage and computation: } add "an allocatable character variable appearing as an ERRMSG variable is allocated by the processor to the correct length" { in the bullet item Input/output: } add "an allocatable character variable appearing as an IOMSG variable is allocated by the processor to the correct length" and also add "an allocatable character variable appearing as the internal record in an internal write is allocated by the processor to the correct length" { in the bullet item Intrinsic procedures and modules: } add "when an allocatable character variable appearing in the argument list is to receive character data, it is allocated by the processor to the correct length" { the Introduction has remarks about each new feature } { update the description of ERRMSG } { 9.7.5 ERRMSG= specifier } [139:10-12p2] now reads: "If an error condition occurs during execution of an ALLOCATE or DEALLOCATE statement with an ERRMSG= specifier, the <> is assigned an explanatory message, truncated or padded according to the rules of intrinsic assignment." change ", truncated or padded according to the rules of" to "as if by" so the resulting sentence reads: "If an error condition occurs during execution of an ALLOCATE or DEALLOCATE statement with an ERRMSG= specifier, the <> is assigned an explanatory message as if by intrinsic assignment." { ERRMSG now allocates as needed } { update the description of ERRMSG } { 11.6.11 STAT= and ERRMSG= specifiers in image control statements } [208:44-46p12] now reads: "If an ERRMSG= specifier appears in an image control statement and an error condition occurs, errmsg-variable is assigned an explanatory message, truncated or padded according to the rules of intrinsic assignment. If no such condition occurs, the definition status and value of errmsg-variable are unchanged." change ", truncated or padded according to the rules of" to "as if by" so the resulting sentence reads: "If an ERRMSG= specifier appears in an image control statement and an error condition occurs, errmsg-variable is assigned an explanatory message as if by the rules of intrinsic assignment. If no such condition occurs, the definition status and value of errmsg-variable are unchanged." { ERRMSG now allocates as needed } { update the description file variable } { in 12.4 Internal files } [216:12-14p2] The fourth bullet item now reads: "A record of the internal file becomes defined by writing the record. If the number of characters written in a record is less than the length of the record, the remaining portion of the record is filled with blanks. The number of characters to be written shall not exceed the length of the record." This bullet item is replaced with the following text that now contains two sub-bullets: "A record of the internal file becomes defined by writing the record. - If the internal file is an allocatable, deferred-length character scalar variable, it becomes defined as if by intrinsic assignment of the record. - Otherwise, if the number of characters written in a record is less than the length of the record, the remaining portion of the record is filled with blanks; the number of characters to be written shall not exceed the length of the record." { writing an internal file to a scalar allocates as needed } {Note to the Editor: the last sentence in the original bullet has been changed to a clause separated by a semicolon. The intent is that this sentence is attached to the "otherwise". The editor is free to rework this as he feels appropriate.} { update the description of IOMSG } { 12.11.6 IOMSG= specifier } [255:2-3p1] now reads: "If an error, end-of-file, or end-of-record condition occurs during execution of an input/output statement, <> is assigned an explanatory message, truncated or padded according to the rules of intrinsic assignment." change "truncated or padded according to the rules of" to "as if by" so the resulting sentence reads: "If an error, end-of-file, or end-of-record condition occurs during execution of an input/output statement, <> is assigned an explanatory message as if by intrinsic assignment." { IOMSG now allocates as needed } { update the description of ERRMSG in collective subroutines } [332:1-3p9] now reads: "If the ERRMSG argument is present in a reference to a collective subroutine and an error condition occurs, it is assigned an explanatory message, truncated or padded with blanks if required. If no error condition occurs, the definition status and value of ERRMSG are unchanged." delete ", truncated or padded with blanks if required" so the resulting sentence reads: "If an ERRMSG= specifier appears in an image control statement and an error condition occurs it is assigned an explanatory message. If no such condition occurs, the definition status and value of errmsg-variable are unchanged." { ERRMSG for collective subroutines behaves as described in 16.9.1 } { treat all intrinsics by adding a general rule } [339:8+] add a new paragraph "When the actual argument corresponding to an INTENT(INOUT) or INTENT(OUT) argument is an allocatable character scalar declared with deferred length is assigned a value, the value is assigned as if by intrinsic assignment." { intrinsic procedures now allocate as needed } /eof