[J3] END statement
Steve Lionel
steve at stevelionel.com
Tue Dec 6 21:35:37 UTC 2022
I think we've digressed some from Jon's original question. I had spent
some time looking at this when he first wrote, but didn't find anything
conclusive. I've taken another look and think I now have.
F2018 6.3.1 says:
"A Fortran program unit is a sequence of one or more lines, organized as
Fortran statements, comments, and INCLUDE lines. A line is a sequence of
zero or more characters. Lines following a program unit END statement
are not part of that program unit. A Fortran statement is a sequence of
one or more complete or partial lines."
This says to me that a line can't span more than one program unit.
I note that NAG Fortran, for Jon's example, says:
NAG Fortran Compiler Release 7.1(Hanzomon) Build 7114
Error: t.f90, line 1: Program unit END stmt must be the last stmt on a line
detected at SUBROUTINE@<end-of-statement>
This is consistent with my reading of 6.3.1.
Steve
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.j3-fortran.org/pipermail/j3/attachments/20221206/3700e16b/attachment.htm>
More information about the J3
mailing list