J3/15-230 To: J3 From: Bill Long Subject: UK-24 ERRMSG Edits Date: 2015 September 27 Reference: WG5/N2059, J3/15-007r2 Discussion ---------- Feature UK-24 was approved for Fortran 2015 by WG5. This paper provides the associated edits to 15-007r2 for that feature. Below are the Syntax and Semantics sections from N2059. Formal Specification: Add an optional argument to each of the intrinsic subroutines GET_COMMAND, GET_COMMAND_ARGUMENT, and GET_ENVIRONMENT_VARIABLE in a manner analogous to the CMDMSG argument for EXECUTE_COMMAND_LINE. In the case of a "warning" situation (that would assign -1 to STATUS), ERRMSG shall be left unchanged. Syntax: The new argument shall be called ERRMSG, and shall be added to the end of the existing argument list (so that there will be no compatibility issue). Edits to 15-007r2 ----------------- [xviii] Introduction, p2, bullet "Intrinsic procedures and modules", Insert new feature description "Access to error messages from the intrinsic subroutines GET_COMMAND, GET_COMMAND_ARGUMENT, and GET_ENVIRONMENT_VARIABLE, is provided by the optional ERRMSG argument." [327] 13.6 Standard generic intrinsic procedures, Table 13.1, In the GET_COMMAND row, after 'STATUS' add ', ERRMSG'. In the GET_COMMAND_ARGUMENT row, after 'STATUS' add ', ERRMSG'. In the GET_ENVIRONMENT VARIABLE row, after 'TRIM_NAME' add ', ERRMSG'. [361:23] 13.8.76 GET_COMMAND, heading, after "STATUS" add ", ERRMSG". [362:8+] 13.8.76 GET_COMMAND, p3 Arguments, insert new argument description at the end of the paragraph: "ERRMSG (optional) shall be a default character scalar. It is an INTENT (INOUT) argument. It is assigned a processor-dependent explanatory message if the command retrieval fails. Otherwise, it is unchanged." [362:21] 13.8.77 GET_COMMAND_ARGUMENT, heading, after "STATUS" add ", ERRMSG". [362:45+] 13.8.77 GET_COMMAND_ARGUMENT, p3 Arguments, insert new argument description at the end of the paragraph: "ERRMSG (optional) shall be a default character scalar. It is an INTENT (INOUT) argument. It is assigned a processor-dependent explanatory message if optional argument STATUS is, or would be if present, assigned a positive value. Otherwise, it is unchanged." [363:13] 13.8.78 GET_ENVIRONMENT_VARIABLE, heading, after "TRIM_NAME" add ", ERRMSG". [363:36+] 13.8.78 GET_ENVIRONMENT_VARIABLE, p3 Arguments, insert new argument description at the end of the paragraph: "ERRMSG (optional) shall be a default character scalar. It is an INTENT (INOUT) argument. It is assigned a processor-dependent explanatory message if optional argument STATUS is, or would be if present, assigned a positive value. Otherwise, it is unchanged."