To: J3 J3/25-126r1 From: Steve Lionel Subject: US-09 Allow I/O of Enumerator Names Date: 2025-February-20 Reference: 23-151r1, 25-007 This paper specifies the edits to support F202Y work item US-09, as described in paper 23-151r1. In summary, entities of non-interoperable enumeration type (7.6.2) may now appear in the I/O list of a formatted I/O statement when corresponding to G format edit descriptor, list-directed or namelist-directed I/O. Edits ----- [xv] Introduction p2 Add under the Input/Output bullet: "Entities of enumeration type (7.6.2) may now appear in the I/O list of list-directed and namelist-directed input/output statements, and when corresponding to a G format edit descriptor in formatted input/output statements." [299:19] 13.7.2.1p1 Data edit descriptors > General rules In the sentence "The I, B, O, and Z edit descriptors can be used to specify input/output of enumeration type data.", insert "G," in an appropriate place in the list of edit descriptors." [308:30] 13.7.5.1p1 Generalized editing Overview After "enum type" insert ", enumeration type, " so that the sentence reads: The Gw, Gw.d and Gw.d Ee edit descriptors are used with an effective item of enum type, enumeration type, or any intrinsic type. [309:31+] After 13.7.5.3 "Generalized logical editing", a new subclause: 13.7.5.x Generalized enumeration editing For input with a Gw, Gw.d, or Gw.dEe edit descriptor, the character string consists of a valid enumerator-name for the type of the input list item, irrespective of case, with trailing blanks ignored. If the input field does not contain such a name, an error condition occurs. The value assigned to the effective item is the enumeration value with that name. For output, the field is the enumerator-name for the output list value, in uppercase and padded with blanks to the right if necessary to satisfy a nonzero w field. If w is nonzero but is shorter than the width of the enumerator-name, the output field is filled with asterisks. If w is zero, the output field is the exact length of the enumerator-name. NOTE An enumerator name consists of the characters of the name in the Fortran character set; the default character set is required to include those characters. [315:15+] 13.10.3.1p6+ List-directed input forms Insert a new paragraph: When the next effective item is of an enumeration type, the value in the input record is interpreted as if a Gw edit descriptor with a suitable value of w were used. [317:27+] 13.10.4p7+ List-directed output Insert a new paragraph: Enumeration type output values are produced with the effect of a G0 edit descriptor. [320:7] 13.11.3.3p1 Namelist input values In "where c is a literal constant" insert "or named " after "literal". so that the sentence reads: Each value is either a null value (13.11.3.4), c, r*c, or r*, where c is a literal or named constant, optionally signed if 8 integer or real, and r is an unsigned, nonzero, integer literal constant. --END--