J3/01-171 Date: 19 Mar 2001 To: J3 From: Richard Maine Subject: I/O modes (issues 306 and 305) Unresolved issue 306 gripes about inconsistent and repetitive discusions of I/O modes. The intent has been clarified in the expositions of other papers, but has not to date been accurately reflected in the actual edits. EDITS {In addition the the cases above, there are undoubtedly other uses of "rounding mode" that should be "io rounding mode". Haven't had time to grep for them all and get into this paper. Editor intends to find and replace them all.} {Here's where we really say it once.} 168:36-42 Replace the para with a new section 9.4.1 (thus renumbering the existing 9.4.x sections). All references too 9.4.1 in the rest of this paper are to the new 9.4.1, not the old one. "9.4.1 Connection modes A connection for formatted input/output has several changeable modes: the blank interpretation mode (10.7.6), delimiter mode (10.9.2, 10.10.2.1), sign mode (10.7.4), decimal edit mode (10.7.8), io rounding mode (10.7.7), pad mode (9.5.4.4.2), and scale factor (10.7.5). A connection for unformatted input/output has no changeable modes. Values for the modes of a connection are established when the connection is initiated. If the connection is initiated by an OPEN statement, the values are as specified, either explicitly or implicitly, by the OPEN statement. If the connection is initiated other than by an OPEN statement (that is, if the file is an internal file or preconnected file) the values established are those that would be implied by an initial OPEN statement without the corresponding keywords. The scale factor cannot be explicitly specified in an OPEN statement; it is implicitly 0. The modes of a connection to an external file may be permamently changed by a subsequent OPEN statement that modifies the connection. The modes of a connection may be temporarily changed by a corresponding keyword specifier in a data transfer statement or by an edit descriptor. Keyword specifiers take effect at the beginning of execution of the data transfer statement. Edit descriptors take effect when they are encountered in format processing. When a data transfer statement terminates, the values for the modes are reset to the values in effect immediately before the data transfer statement was executed. {Delete a redundant and poorly phrased text. Poorly phrased because it uses the term "initial modes" which we never did a good job of defining. We've goten rid of it now. There are just current modes.} [170:4-5] Delete "The initial...executed." {Some terminology consistency trivia.} [170:9] "specifiers" -> "modes" [170:17] "properties" -> "modes" {This list is out of date. Fix it in a way that will stay fixed.} [170:22] "BLANK=...specifiers" -> "specifiers for changeable modes (9.4.1)" [170:27-28] "BLANK=...specifiers" -> "specifiers for changeable modes" [170:27] "value" -> "values" {for number agreement} {Make wording of OPEN statement specifiers consistent. Say the same things, using the same terminology and in the same order for each of the specifiers that really do act the same. It is really quite impressive how different these sections were in various trivial ways. Also make them reference how changeable modes work instead of repeating it in multiple inconsistent ways. Get rid of "initial" terminology. Also fix miscellaneous inappropriate phrasing; for example these specifiers aren't for files - they are for connections. And say modes have no effect instead of "are ignored" in some cases.} [172:34-37] replace "The BLANK=...NULL." The BLANK= specifier is permitted only for a connection for formatted input/output. It specifies the current value of the blank interpretation mode (10.7.6, 9.5.1.11) for input for this connection. This mode has no effect on output. It is a changeable mode (9.4.1). If this specifier is omitted in an OPEN statement that initiates a connection, the default value is NULL. [173:11-15] replace "The DELIM=...during formatted input." The DELIM= specifier is permitted only for a connection for formatted input/output. It specifies the current value of the delimiter mode (9.5.1.12) for list-directed (10.9.2) and namelist (10.10.2.1) output for the connection. This mode has no effect on input. It is a changeable mode (9.4.1). If this specifier is omitted in an OPEN statement that initiates a connection, the default value is NONE. [173:17-20] replace "The PAD=...during formatted output." The PAD= specifier is permitted only for a connection for formatted input/output. It specifies the current value of the pad mode (9.5.4.4.2, 9.5.1.13) for input for this connection. This mode has no effect on output. It is a changeable mode (9.4.1). If this specifier is omitted in an OPEN statement that initiates a connection, the default value is YES. [173:24-29] replace "The DECIMAL=...unchanged." The DECIMAL= specifier is permitted only for a connection for formatted input/output. It specifies the current value of the decimal edit mode (10.7.8, 9.5.1.9) for this connection. This is a changeable mode (9.4.1). If this specifier is omitted in an OPEN statement that initiates a connection, the default value is POINT. [173:36-42] replace "The ROUND=...unchanged." The ROUND= specifier is permitted only for a connection for formatted input/output. It specifies the current value of the io rounding mode (10.7.7, 9.5.1.10) for this connection. This is a changeable mode (9.4.1). If this specifier is omitted in an OPEN statement that initiates a connection, the io rounding mode is processor dependent; it may be any one of the above modes. [174:7-10] replace "The SIGN=...(10.7.4)." The SIGN= specifier is permitted only for a connection for formatted input/output. It specifies the current value of the sign mode (10.7.4, 9.5.1.14) for this connection. This is a changeable mode (9.4.1). If this specifier is omitted in an OPEN statement that initiates a connection, the default value is PROCESSOR_DEFINED. {I assume the last sentence above is the intent. I couldn't find anything that actually said it.} {Similarly fix data transfer statements. These were just plain wrong before.} [179:39-44] replace "The DECIMAL=...no DECIMAL= specifier." The DECIMAL= specifier temporarily changes (9.4.1) the decimal edit mode (10.7.8, 9.4.4.11) for the connection. If the specifier is omitted, the mode is not changed. [180:2-7] replace "the values...no ROUND= specifier." The ROUND= specifier temporarily changes (9.4.1) the rounding mode (10.7.7, 9.4.4.13) for the connection. If the specifier is omitted, the mode is not changed. [180:9-14] replace "The BLANK=...formatted output." The BLANK= specifier temporarily changes (9.4.1) the blank interpretation mode (10.7.6, 9.4.4.6) for the connection. If the specifier is omitted, the mode is not changed. [180:16-21] replace "The DELIM=...formatted output." The DELIM= specifier temporarily changes (9.4.1) the delimiter mode (10.9.2, 10.10.2.1, 9.4.4.9) for the connection. If the specifier is omitted, the mode is not changed. [180:23-28] replace "The PAD=...formatted input." The PAD= specifier temporarily changes (9.4.1) the pad mode (9.5.4.4.2, 9.4.4.10) for the connection. If the specifier is omitted, the mode is not changed. [180:30-36] replace "The SIGN=...formatted input." The SIGN= specifier temporarily changes (9.4.1) the sign mode (10.7.4, 9.4.4.14) for the connection. If the specifier is omitted, the mode is not changed. [181:1-17] Delete issue 306. [192:45-193:5] Delete. {Now covered by 9.4.1 in a way independent of dtio. The dtio procedure doesn't need to worry about resetting this stuff because it is reset after each child data transfer statement...or indeed after any data transfer statement at all.} {Will likely later end up deleting note 9.45 also, but that's in a separate paper.} {Similarly fix up stuff in 10.7. Including a bunch of previously uncaught typos.} [221:1-8] replace "may...restored to the procesor." temporarily change (9.4.1) the sign mode (9.4.4.14,9.5.1.14) for the connection. The edit descriptors SS, SP, and S set the sign mode corresponding to the SIGN= specifier values SUPPRESS, PLUS, and PROCESSOR_DEFINED, respectively. The sign mode controls optional plus characters in numeric output fields. When the sign mode is PLUS, the processor shall produce a plus in any position that normally contains an optional plus. When the sign mode is SUPPRESS, the processor shall not produce a plus in such positions. When the sign mode is PROCESSOR_DEFINED, the processor has the option of producing a plus or not in such positions, subject to 10.6.1(5). [221:20] replace these lines (including the superfluous 10.7.5.1 section header and the note that we don't bother with for any of the other modes - plus the note is obvious with the new phrsing) with The P edit descritor temporarily changes (9.4.1) the scale factor for the connection to . The scale factor affects the editing of F, E, EN, ES, D, and G edit decriptors for numeric quantities. [221:40-45] replace "may...are ignored." temporarily change (9.4.1) the blank interpretation mode (9.4.4.6, 9.5.1.11) for the connection. The edit descriptors BN and BZ set the blank interpretation mode corresponding to the BLANK= specifier values NULL and ZERO, respectively. The blank interpretation mode controls the interpretation of nonleading blanks in numeric input fields. Such blank characters are interpreted as zeros when the blank interpretation mode has the value ZERO; they are ignored when the blank interpretation mode has the value NULL. [221:2-5] Delete "If a BZ...ZERO." [221:6] "BN and BZ edit descriptors affect" -> "blank interpretation mode affects" [221:7] "They have" -> "It has" [222:9-] replace "may..9.5.1.10." and the following para break with. temporarily change (9.4.1) the io rounding mode (9.4.4.13, 9.5.1.10) for the connection. [222:13-15] replace "This...only" "The io rounding mode affects the conversion of real and complex values in formatted input/output. It affects only" [223:20-] replace "may...only" "temporarily change (9.4.1) the decimal edit (9.4.4.11, 9.5.1.9) for the connection. The edit descriptors DC and DP set the decimal edit mode corresponding to the DECIMAL= specifier values COMMA and POINT, respectively. The decimal edit mode controls the representation of the decimal symbol (10.5) during conversion of real and complex values in formatted input/output. The decimal edit mode affects only" {Annex C fixes} {This is a substitute for the parts of paper 01-108r2 other than the edits to table c.1}. [169:1-6] Delete the J3 note. [437:36-46] Delete. This doesn't really add anything to what is said better in the normative text. [437:19] After "properties" insert ", among others," {Ok, it's a quick fix, but it works. Note that even paper 108r2 doesn't add most of them - just the changeable modes.} [169:1-6] Delete issue 305