To: J3 J3/14-101 From: Steve Lionel Subject:type-spec for ac-do-variable Date: 2013 December 20 Reference: 10-007r1 Fortran 2008 added the ability to optionally specify the type of the index-name directly in a forall-header (R752), allowing the programmer to specify the type of this construct entity at the point where it is created, rather than inheriting the type from the enclosing scope. This applies to FORALL and DO CONCURRENT. This feature was not also applied to the ac-do-variable in an array constructor implied-DO (R473), which, as a statement entity it would also benefit from the option of local type specification. This omission creates an asymmetry in the language that should be corrected in the next standard. A similar case can be made for the data-i-do-variable in data-implied-do (R537), which is also a statement entity. Note that io-implied-do does not create a statement or construct entity, so this issue does not apply there. Suggested edits, in reference to 10-007r1, are provided to correct this defect. EDITS to 10-007r1: [84:42] 4.8, R473 Replace R473 with: R473 ac-implied-do is ( ac-value-list, [type-spec ::] ac-implied-do-control ) Alternatively, the optional type-spec could be added to R474, but the edits to 16.4 are cleaner if it's R473. Insert new constraint C4107a C4107a (R473) type-spec in ac-implied-do shall specify type integer Consider also qualifying the references to type-spec in C4103, C4104 and C4105 (all for R469) so as to reduce possible confusion with the different type-spec applying to R473. [104:17-20], 5.4.7, R537 Replace R537 with: R537 data-implied-do is ( data-i-do-object-list, [type-spec ::] data-i-do-variable = scalar-int-constant-expr, scalar-int-constant-expr [, scalar-int-constant-expr] ) Insert new constraint C568a C568a (R537) type-spec shall specify type integer [442:23-29] 16.4 Replace the second sentence of paragraph 4 with the following two sentences: It is a scalar variable. If type-spec appears in data-implied-do or ac-implied-do, the variable has the specified type and type parameters; otherwise it has the type and type parameters that it would have if it were the name of a variable in the innermost executable construct or scoping unit that includes the DATA statement or array constructor, and this type shall be integer type; it has no other attributes. SUBMITTED BY: Steve Lionel