Regularize I/O Keywords Edits To: J3 From: Craig Dedo Date: December 14, 2000 Subject: Regularize I/O Keywords - Edits Introduction Users often would like to have complete regularity between the keywords for the OPEN statement and the keywords that are allowed for the READ and WRITE statements. JOR considered this need and proposes to allow the BLANK=, DELIM=, and PAD= keywords in READ and WRITE statements and to add a SIGN= keyword to the OPEN, READ, WRITE, and INQUIRE statements. Edits Edits are with respect to the 00-007r3. [172:25+] Add the list item: (14) The initial sign mode is processor dependent. [173:18+] Add the following paragraph immediately before 9.4.1: A unit has various modes associated with it. An initial mode is established by the most recently executed OPEN statement on that unit. The specification may be explicit or implicit. The initial modes for an internal file or preconnected file are the same as if an OPEN statement without the corresponding keywords had been executed. Some modes may be temporarily changed by a corresponding keyword specifier in a data transfer statement, or by an edit descriptor. When a data transfer statement terminates, the values of these modes are reset to the values in effect immediately before the data transfer statement was executed. [174:14] Add the following at the end of the paragraph: The initial modes for a preconnected file are the same as if an OPEN statement without the corresponding keywords had been executed. [175:22+] Add the following to the list: or SIGN = scalar-default-char-expr [177:1] Delete "/output". Add "(9.5.1.11)" after "connection". [177:22-28] Delete the second, third, and fourth sentences in the paragraph. Add the following sentence immediately after the deleted sentences. The DELIM= specifier sets the initial value of the delimiter mode (9.5.1.12) for list-directed (10.9.2) and namelist (10.10.2.1) output for this connection. [177:32] Add the following sentence immediately after the first sentence. The PAD= specifier sets the initial value of the pad mode (9.5.4.4.2, 9.5.1.13) for all formatted input for this connection. [177:32-35] Delete the sentences, "If YES . . . record contains." [178:17+] Add the following sub-section to section 9.4.4: 9.4.4.14 SIGN= specifier in the OPEN statement The scalar-default-char-expr shall evaluate to one of PROCESSOR_DEFINED, PLUS, or SUPPRESS. The SIGN= specifier is only permitted for a file connected for formatted input/output. The SIGN= specifier sets the initial value of the sign mode for formatted output for this connection (9.5.1.14). The SIGN= specifier values correspond to sign edit descriptors S, SP, and SS, respectively (10.7.4). [180:26+] Add the following to the list: or BLANK = scalar-default-char-expr or DELIM = scalar-default-char-expr or PAD = scalar-default-char-expr or SIGN = scalar-default-char-expr [180:29+] Add "Constraint: A DELIM= or SIGN= specifier shall not appear in a read-stmt.". [180:30] Add "BLANK=, PAD=," to the constraint before "END=". [181:13] After "DECIMAL=", add, ", BLANK=, PAD=, SIGN=". [181:14+] Add "Constraint: If a DELIM= specifier is present, either format shall be an asterisk or namelist-group-name shall appear. [181:21] After "DECIMAL=" add "BLANK=, DELIM=, PAD=, SIGN=". [184:16+] Add the following sub-sections to section 9.5.1: 9.5.1.11 BLANK= specifier in a data transfer statement The scalar-default-char-expr shall evaluate to NULL or ZERO. It specifies the initial value of the blank interpretation mode (10.7.6) for a formatted input statement. If no BLANK= specifier appears in the io-control-spec-list, the initial value of the blank interpretation mode is that established by the most recently executed OPEN statement (9.4.4, 9.4.4.6) on that unit; a preconnected file that has not been opened or an internal file is treated as if the file had been opened with no BLANK= specifier (9.4.4.6). This specifier is permitted only for formatted input. 9.5.1.12 DELIM= specifier in a data transfer statement The scalar-default-char-expr shall evaluate to APOSTROPHE, QUOTE, or NONE. It specifies the initial value of the delimiter mode (9.4.4.9) for a formatted output statement. If no DELIM= specifier appears in the io-control-spec-list, the initial value of the delimiter mode is that established by the most recently executed OPEN statement (9.4.4, 9.4.4.9) on that unit; a preconnected file that has not been opened or an internal file is treated as if the file had been opened with no DELIM= specifier (9.4.4.9). This specifier is permitted only for formatted output. 9.5.1.13 PAD= specifier in a data transfer statement The scalar-default-char-expr shall evaluate to YES or NO. It specifies the initial value of the pad mode (9.4.4.10) for a formatted input statement. If no PAD= specifier appears in the io-control-spec-list, the initial value of the pad mode is that established by the most recently executed OPEN statement (9.4.4, 9.4.4.10) on that unit; a preconnected file that has not been opened or an internal file is treated as if the file had been opened with no PAD= specifier (9.4.4.10). This specifier is permitted only for formatted input. 9.5.1.14 SIGN= specifier in a data transfer statement The scalar-default-char-expr shall evaluate to one of PROCESSOR_DEFINED, PLUS, or SUPPRESS. It specifies the initial value of the sign mode (10.7.4) for a formatted input statement. If no SIGN= specifier appears in the io- control-spec-list, the initial value of the sign mode is that established by the most recently executed OPEN statement (9.4.4, 9.4.4.14) on that unit; a preconnected file that has not been opened or an internal file is treated as if the file had been opened with no SIGN= specifier (9.4.4.14). It specifies the initial value of the sign mode (10.7.4) for a formatted data transfer statement. The SIGN= specifier values correspond to sign edit descriptors S, SP, and SS, respectively. This specifier is permitted only for formatted output. [186:42] Change "PAD= specifier" to "pad mode". [190:41,43;191:1,4] Change "from a file whose PAD= specifier" to "when the pad mode" four times. [200:25+] Add the following to the list: or SIGN = scalar-default-char-variable [203:10-12] Replace the first sentence of the paragraph with the following sentence. The scalar-default-char-variable in the BLANK= specifier is assigned the value ZERO or NULL, corresponding to the blank interpretation mode in effect for a file connected for formatted input. [204:4-7] Replace the first three sentences of the paragraph with the following sentence. The scalar-default-char-variable in the DELIM= specifier is assigned the value APOSTROPHE, QUOTE, or NONE, corresponding to the delimiter mode in effect for a file connected for formatted output. [204:11-13] Replace both sentences of the paragraph with the following sentence. The scalar-default-char-variable in the PAD= specifier is assigned the value YES or NO, corresponding to the pad mode in effect for a file connected for formatted input. [205:12+] Add the following sub-section to section 9.8.1: 9.8.1.30 SIGN= specifier in the INQUIRE statement The scalar-default-char-variable in the SIGN= specifier is assigned one of the values PLUS, SUPPRESS, or PROCESSOR_DEFINED, corresponding to the sign mode (10.7.4) in effect for a file connected for formatted output. If there is no connection or the connection is not for formatted input/output, the scalar-default-char-variable is assigned the value UNDEFINED. [207:4] Change "PAD= specifier" to "pad mode". [214:9-11] Replace "a combination of any BLANK= specifier . . .(10.7.6)" with "the blank interpretation mode (10.7.6)". [223:1] Replace "control" with "change the sign mode, which controls". [223:2-3] Replace the sentence beginning with, "At the beginning . . ." with "During formatted output, the option of producing a plus in numeric output fields is determined by the value of the sign mode (9.4.4.14, 9.5.1.14).". [223:39] Replace "specify" with "change the blank interpretation mode, which controls". [223:40-44] Replace the sentence beginning with, "At the beginning . . ." with "During formatted input, nonleading blank characters are interpreted as zeros if the blank interpretation mode has the value ZERO or are ignored if the blank interpretation mode has the value NULL (9.4.4.6, 9.5.1.11)." [224:5] Add the following sentence at the end of the paragraph: The BN edit descriptor sets the blank interpretation mode to NULL; the BZ edit descriptor sets the blank interpretation mode to ZERO. [229:5-6] Change the text to read, "Character sequences produced when the delimiter mode has a value of NONE". [229:13] Change the text to read, "Character sequences produced when the delimiter mode has a value of QUOTE". [229:16] Change the text to read, "Character sequences produced when the delimiter mode has a value of". [234:3-4] Change the text to read, "Character sequences produced when the delimiter mode has a value of NONE". [234:14] Change the text to read, "Character sequences produced when the delimiter mode has a value of QUOTE". [234:17] Change the text to read, "Character sequences produced when the delimiter mode has a value of". References 00-007r3, Fortran 2000 Draft 00-279, Regularize I/O Keywords 00-316r1, Regularize I/O Keywords - Technical Specification and Syntax [End of J3 / 00-323r3]