J3/15-105 To: J3 From: Malcolm Cohen Subject: Initial line and semicolon Date: 2014 December 25 ---------------------------------------------------------------------- NUMBER: F08/0127 TITLE: May an initial line begin with a semicolon? KEYWORDS: Semicolon DEFECT TYPE: Clarification STATUS: J3 consideration in progress QUESTION: The Introduction to ISO/IEC 1539-1:2010, page xvi, states "A line in the program is permitted to begin with a semicolon." Therefore, do the following 3 lines constitute a valid program. ;PROGRAM bad PRINT *,'No' END PROGRAM ANSWER: No, the example is not a valid program as it does not satisfy the syntax rules and constraints. As stated in 3.3.2.5 and 3.3.3.4, a semicolon may be used to terminate a statement. That is not the case in the example, since there is no statement before the semicolon. The semicolon does not appear anywhere else in the Fortran syntax and therefore the example does not conform. An edit is supplied to the Introduction to clarify the change in Fortran 2008. EDITS: [xvi] Change "A line in the program" to "A continuation line". SUBMITTED BY: Malcolm Cohen HISTORY: 15-nnn m206 F08/0127 submitted ----------------------------------------------------------------------