To: J3 J3/22-137 From: Malcolm Cohen Subject: SIZE= without any reason Date: 2022-March-02 ---------------------------------------------------------------------- NUMBER: F18/038 TITLE: SIZE= with no reason DEFECT TYPE: Erratum STATUS: J3 consideration in progress QUESTION: Fortran 2018 permits SIZE= without ADVANCE=. SIZE= assigns to its variable the number of character transferred by edit descriptors. This means that SIZE= is also allowed for list-directed and namelist input/output, but no edit descriptor is involved, so this will always assign the value zero to the variable. For example, READ(*,*,SIZE=N) X PRINT *,N ! Always prints zero. Was this superfluous additional way of assigning zero to an integer variable deliberately added? ANSWER: No, this was not a deliberate addition. An edit is provided to remove this inadvertent feature. ALTERNATIVE ANSWER: No, this was not a deliberate addition, but it is not a mistake for the language to have useless features. EDIT to 18-007r1: [225:29+] 12.6.2.1 Syntax, in 12.6.2 Control information list, After constraint C1213 that begins "(R1213) A BLANK=, PAD=, END=, EOR=, or SIZE= specifier..." insert new constraint "C1213a A SIZE= specifier shall not appear in a list-directed or namelist input statement." ALTERNATIVE EDIT to 18-007r1: None. SUBMITTED BY: Malcolm Cohen HISTORY: 22-nnn m226 Submitted ----------------------------------------------------------------------