To: J3 07-325 From: Bill Long Subject: BOZ editing Date: 2007 October 30 References: J3/07-007r3, WG5/N1695 Discussion Part 3 of paper N1695 retains the ability for formatted input and output of values of type REAL and COMPLEX (as well as INTEGER) using the Z, O, or B edit descriptors. Edits are provided to put this capability back into the f08 draft. These are largely an adaptation of subclause 10.7.2.4 Bits editing [285:1-24] in J3/07-007r2. As was the case in the 07-007r2 draft, these edit descriptors are removed from the section in "Integer editing". Also carried forward are fixes to the defective f03 description of BOZ editing for integers that were fixed as part of the bits feature. Edits to 07-007r3: Apply the following edits to subclause 10.7.2.2 Integer editing: [265:35] In para 1, replace "The I, I, B, B, O, O, Z, and Z edit descriptors" with "The I and I edit descriptors". [265:37-38] Replace the last sentence of para 1 with "The G, B, O, and Z edit descriptors also may be used to edit integer data (10.7.5.2.1, \ref{B, O, and Z editing})." [265:41-266:2] Delete the second and third sentences of para 3: "For the B, O, ... hexadecimal digits." [266:3] Delete para 4: "If the output list item is of type bits..." [266:7-9] Delete para 6: "The output field for the B ... leading zeros." [266:9+] Delete Note 10.10: "A binary, octal, ...". [266:10-11] In the first sentence of para 7, delete ", B, O, and Z" and ", B, O, and Z". ------------------ Apply the following edit to subclause 10.7.2.3.1 Real and Complex editing / General: [266:19-20] Replace the last sentence of para 1 with "The G, B, O, and Z edit descriptors also may be used to edit real and complex data (10.7.5.2.1, \ref{B, O, and Z editing})." ------------------- [271:1-] Between Note 10.15 and 10.7.3, add a new subclause: "10.7.2a B, O, and Z editing The B, B, O, O, Z, and Z edit descriptors indicate that the field to be edited occupies positions, except when is zero. When is zero, the processor selects the field width. On input, shall not be zero. The input/output list item shall be of type integer, real, or complex. On input, has no effect. In the input field for the B, O, and Z edit descriptors the character string shall consist of binary, octal, or hexadecimal digits (as in R413, R414, R415) in the respective input field. The lower-case hexadecimal digits a through f in the hexadicimal input field are equivalent to the corresponding upper-case hexadecimal digits. The input field is edited as if the input list item had an internal value identical to the internal value represented by the bit sequence denoted by the sequence of binary, octal, or hexadecimal digits in the input field, padded with zero-bits on the left if needed. The output field for the B, O, and Z descriptors consist of zero or more leading blanks followed by the internal value in a form identical to the digits of a binary, octal, or hexadecimal constant, respectively, denoting a bit sequence whose internal representation has the same value and without leading zeros. Note 10.x A binary, octal, or hexadecimal constant always consists of at least one digit or hexadecimal digit. [end note] R1021 <> [ ] ... The output field for the B, O, and Z edit descriptor is the same as for the B, O, and Z edit descriptor, except that the or consists of at least digits. If necessary, sufficient leading zeros are included to achieve the minimum of digits. The value of shall not exceed the value of , except when is zero. If is zero and the internal value is zero, the output field consists of only blank characters. When and are both zero, and the internal value is zero, one blank character is produced."