J3/05-275 To: J3 From: Dan Nagle Subject: g0 & * Date: 2005 October 22 This paper furthers the ideas of 05-255r1, which was a substitute design for 05-249 and 05-253, it is an attempt to further item J3-048. This paper advances Van's G format descriptor modifications to make G format enable easy writing of CSV files. It adds Dick's idea for * as the infinite repeat count specifier. Malcolm added some critical thoughts to this design. Specification: With a G edit descriptor, allow a w=0 to specify minimum-width output format. The w=0 is not allowed for input. If w=0, d and Ee shall not be present. If the corresponding list item is of type character, the effect of the G0 is the same as an A edit descriptor with no width specified. If the corresponding list item is of type logical, the effect of the G0 is the same as an L1 edit descriptor. If the corresponding list item is of type integer, the effect of the G0 is the same as an I0 edit descriptor. If the corresponding list item is of type real, the effect of the G0 is the same as an ESw.dEe edit descriptor, where the processor will use reasonable values of w, d and e so there will be no leading or trailing spaces. Allow * a sub-format prefix specifying that format reversion does not start a new record. Example: (*(g0,:,',')) writes a "CSV" line, given any number of any intrinsic type & kind of list items. Syntax: Allow G0 edit descriptor in formats. Allow * to suppress new records when format reversion occurs. Edits Modify R1004 [222:14+] Add <> * Modify C1003 [222:15] Change " shall be positive" to "If is an , it shall be positive" Modify the text [222:17] Delete "The integer literal constant" [222:17] Add "If is *, the shall be enclosed in parenthesis, and shall be subject to reversion." Add * to reversion discussion [225:20] Add "If the repeat specifier is *, the / processing is suppressed." [223:9] Change "G w . d [ E e ]" to "G w [ . d [ E e ] ]" [223:20] Change "and F" to "F, and G" [224:21+] Add a new constraint "C1006a (R1005) For the G edit descriptor, shall be specified if and only if is not zero." [224:33] Change "a repeat specification" to "an repeat specification" [227:13] After "and F" to "F, and G" [233:20] Change "Gw.d and Gw.dEe" to "Gw, Gw.d, and Gw.dEe" [233:21] Change "These" to "When is nonzero, these" [233:23] Add: "When is zero, and E shall not be appear, and the processor selects the field width. When does not appear, shall be zero. On input, shall not be zero." [233:25] Change "Gw.d and Gw.dEe" to "Gw, Gw.d, and Gw.dEe" [233:29] Add "When used to specify the output of integer data, the G0 edit descriptor follows the rules for the I0 edit descriptor." [234:1-] At the top of the page, add "When used to specify the output of real and complex data, the G0 edit descriptor follows the rules for the ESw.dEe edit descriptor, for reasonable processor-dependent values of , , and ." [234:15] Add "When used to specify the output logical data, the G0 edit descriptor follows the rules for the L1 edit descriptor." [234:18] Add "When used to specify the output character data, the G0 edit descriptor follows the rules for the A edit descriptor with no field width."