12-151r2 To: J3 From: Malcolm Cohen Subject: Interp: Implicit type in BLOCK construct Date: 2012 June 28 --------------------------------------------------------------------- NUMBER: F08/0074 TITLE: Implicit type in BLOCK construct KEYWORDS: IMPLICIT, BLOCK DEFECT TYPE: Erratum STATUS: J3 consideration in progress QUESTION: Consider Program m198_1 Implicit Complex(a-z) Logical x x = .True. Block Dimension x(2) x = 3 Print *,x End Block End Program Is this standard-conforming, and if so, what is the type of the X inside the BLOCK construct? The Fortran 2008 standard specifies the implicit mapping in program units, interface bodies, internal procedures, and module procedures, at 5.5p3, but does not specify the implicit mapping in a BLOCK construct. ANSWER: This was intended to be standard-conforming; the type of X is COMPLEX. An edit is provided to remedy this omission. EDIT: [109:16] In 5.5p3, last sentence, After "and the default for" change "an internal or module procedure" to "a BLOCK construct, internal subprogram, or module subprogram". This makes the whole sentence read "If a mapping is not specified for a letter, the default for a program unit or an interface body is default integer if the letter is I, J, ..., or N and default real otherwise, and the default for a BLOCK construct, internal subprogram, or module subprogram, is the mapping in the host scoping unit." SUBMITTED BY: Malcolm Cohen HISTORY: 12-151 m198 Submitted. 12-151r1 m198 Revised edit. ------------------------------------------------------------------------