To: J3 Members J3/16-264r4 From: Van Snyder & Steve Lionel Subject: Comments on Clause 12 References: 16-007r2 Date: 2016 October 13 1. Edits accepted (with modifications) -------------------------------------- [217:29 12.2.2p1 Formatted record] Editor's choice: Replace "However, it may depend" with "However, the length may depend", join this sentence with the previous one using a semicolon, or merge this sentence with the following one ("The length may also be zero.") (The "it" referenced in "it may depend" is ambiguous, since the most recent "it" was the record itself.) [221:24-25 12.3.4.2p2 Advancing and nonadvancing input/output] Delete the sentence "It is also possible ... their lengths." {because this does not any longer depend upon nonadvancing input}. [223:4 12.4p2(1) Internal files] After "variable of default, ASCII, or ISO 10646 character" insert "kind". [230:22+ 12.5.6.18p3+ STATUS= specifier in the OPEN statement] Move NOTE 12.21 to be after 12.5.6.18p3. (More appropriate placement.) [239:3-4 12.6.4.1p1 Data transfer sequence of operations] Replace "for a file that does not exist" with "for a unit connected to a file that does not exist" (This is a property of the connection.) [239:7 12.6.4.1p2(1) Data transfer sequence of operations] After "Determine the direction of data transfer" add and link "(12.6.4.2)" (Direction of data transfer) [239:8 12.6.4.1p2(2) Data transfer sequence of operations] After "Identify the unit" add and link "(12.6.4.3)" (Identifying the unit) [239:25 12.6.4.1p3(1) Data transfer sequence of operations] After "Determine the direction of data transfer" add and link "(12.6.4.2)" (Direction of data transfer) [239:26 12.6.4.1p3(2) Data transfer sequence of operations] After "Identify the unit" add and link "(12.6.4.3)" (Identifying the unit) [244:9 12.6.4.8.3p1 Defined input/output procedures] Replace "The user need not" with "The program need not" {because the program might have been produced by other than a human "user"}. [245:39+ 12.6.4.8.3 Defined input/output procedures] Move the entirety of 12.6.4.8.2 (Executing defined input/output data transfers) here. The remaining text in the current 12.6.4.8.3 properly belongs as part of the description of how such transfers are executed, and explaining any part of how the transfer is executed before describing the procedures seems inappropriate. [247:21+2 NOTE 12.45 Defined input/output] Replace "A child data transfer statement shall not specify" with "A child data transfer statement cannot specify". (The note improperly expresses requirements.) [250:12 12.7.1p3 Wait operation] Hyperlink "input/output storage sequence" to 12.6.2.5 (ASYNCHRONOUS= specifier in a data transfer statement) [253:29+ 12.10.1p2+ Forms of the INQUIRE statement] Insert a paragraph: "For inquiry by file, the file specified need not exist or be connected to a unit. If it is connected to a unit, the inquiry is being made about the connection and about the unit connected." 2. Optional edits at the editor's discretion -------------------------------------------- [228:27 12.5.6.7p1] Replace "This" with "It" {because "It" seems to be more common among similar descriptions}. [230:5 12.5.6.16p1] Replace "This" with "It" {because "It" seems to be more common among similar descriptions}. [230:10 12.5.6.17p1] Replace "This" with "It" {because "It" seems to be more common among similar descriptions}. 3. Edits rejected ----------------- [220:33+2 NOTE 12.8 Stream access] Replace "Because the record" with "If the record". Delete "the" from "the record markers" . (In stream I/O, there ARE always record markers.) [223:22 12.4p2(10) Internal files] Before "formatted" insert "nonadvancing". (Because nonadvancing internal I/O is not a thing (C1221)) [225:31-34 12.5.4p5 Connection of a file to a unit] Before "main program" insert "program with a" because program units other than the main program might perform input/output operations. (The existing text already says what is needed and is unambiguous.) [226:5 12.5.5p1 OPEN statement] Delete "the" before "prior" because "the" implies there is exactly one prior execution of an OPEN statement. (No, it doesn't.) [227:21 C1203 OPEN statement] Before "No specifier" insert "(R1204)" (because there's only one BNF rule for and only appears in R1204) (Editor says we do this only when there is a possibility for confusion.) [234:10-13 12.6.2.3 NML= specifier in a data transfer statement] Move 12.6.2.3 NML= to [235:3+ 12.6.2.9+] between ID= and PAD=, to put subclauses in alphabetical order. (NML, like FMT and UNIT, is special in that the keyword is optional, so it belongs grouped with those.) The following three edits are replaced with edits in section 1. [239:3-4 12.6.4.1p1] Delete the paragraph because the direction of transfer has not been determined, and the unit has not yet been identified. It reappears below. [239:8+ 12.6.4.1p2(2)+] Insert a list item: "(2a) Execution of a WRITE or PRINT statement for a file that does not exist creates the file. If an error occurs, steps 3 through 8 are skipped." {Existing steps 3-8.} [239:26+ 12.6.4.1p3(2)+] Insert a list item: "(2a) Execution of a WRITE or PRINT statement for a file that does not exist creates the file. If an error occurs, steps 4 through 8 are skipped." {Existing steps 4-8.} [241:31 12.6.4.5.1p8] Before "transferring" insert "evaluating an expression in an input list item or" {because a function therein is not required to be pure.} (Unnecessary per 10.1.14p2(2)) [245:40 12.6.4.8.3p12] After "invoked" insert "by the processor during execution of a parent data transfer statement" {because it is not prohibited to invoke a defined input/output procedure directly}. (Replaced by edits in section 1.) [247:19 12.6.4.8.3p28 Defined input/output procedures] Replace "shall not define" with "shall not reference, define" (Technical change - submit separate paper if desired) [247:21 12.6.4.8.3p28] At the end of the paragraph append a sentence: "A defined input procedure, and any procedures invoked therefrom, shall not reference any storage unit referenced by or associated with any input item, or any specifier that might be changed by an active parent data transfer statement. A defined output procedure, and any procedures invoked therefrom, shall not reference any part of an internal file designated by the \cf{unit} argument, or any storage unit associated therewith." {Because the input items etc. might not yet be defined.} (Replaced with edits in section 1.) [250:16+ 12.7.1p5+ Wait operation] Insert a paragraph: "If no error condition occurs during a wait operation for a unit, the variable associated with the SIZE= specifier in the statement that initiated the transfer, if any, becomes defined as specified in 12.6.2.15." {reference is to SIZE= specifier in a data transfer statement} (Unnecessary) 4. Questions without edits -------------------------- [219:3-7 12.3.2p3] Is it processor dependent whether stdin, stdout, and stderr exist? (The standard doesn't make references to these terms. 16.10.2 requires that there be at an INPUT_UNIT and OUTPUT_UNIT preconnected, and ERROR_UNIT may be the same as OUTPUT_UNIT. A standard-conforming program can assume that there are preconnected units with numbers as specified by INPUT_UNIT, OUTPUT_UNIT and ERROR_UNIT, suitable for the purposes stated in the decriptions of those constant names. A program can't necessarily assume that these correspond to an implementation-specific concept such as stdin, stdout or stderr.) [232:34 C1216] Why is namelist prohibited for direct access? It can't be because namelist input or output might require more than one record, because formatted input or output could require more than one record. ("Why" questions are out of scope for this paper. It does seem that there is no technical reason to prohibit it.) [233:6-7 C1220] Why is list-directed prohibited for direct access? It can't be because list-directed input or output might require more than one record, because formatted input or output could require more than one record. ("Why" questions are out of scope for this paper. It does seem that there is no technical reason to prohibit it.) [251:3-4 12.7.2p3] What happens if the expression specified by the ID= specifier is zero? Is it the same as the specifier not appearing? (An ID of zero indicates that the specified transfer has already completed (12.6.2.9p1) and thus no waiting is necessary. It is not the same as the specifier not appearing, which waits for all pending transfers.) [252:8 12.8.3p1] Should "also may be" be "is"? (No - "also may be" refers to whether it is possible for the file to be connected for direct access, in which case there are possibly some restrictions on the file structure.) [256:12-17 12.10.2.10] Should the description of the ENCODING= specifier include DEFAULT encoding, instead of producing UNDEFINED if the connection is not using UTF-8 encoding? (No. The existing text would have it produce UNKNOWN, not UNDEFINED, but a value of DEFAULT is no more helpful than UNKNOWN. If the processor supports some additional encodings, a value for one of those could be returned (see note 12.58).) [261:16+ 12.11.3p1(2)+] Is the variable specified in the SIZE= specifier defined (or undefined) if an end-of-file condition occurs? (It is defined as the statement has now completed. It would have the value of the number of characters transmitted, which might be zero.)