Node: Statements Comments Lines, Next: Scope of Names and Labels, Previous: Syntactic Items, Up: Terms and Concepts
(Corresponds to Section 2.3 of ANSI X3.9-1978 FORTRAN 77.)
Use of an exclamation point (!) to begin a
trailing comment (a comment that extends to the end of the same
source line) is permitted under the following conditions:
Use of a semicolon (;) as a statement separator
is permitted under the following conditions:
IF statement nor a non-construct
WHERE statement (a Fortran 90 feature) may be
followed (in the same, possibly continued, line) by
a semicolon used as a statement separator.
This restriction avoids the confusion that can result when reading a line such as:
IF (VALIDP) CALL FOO; CALL BAR
Some readers might think the CALL BAR is executed
only if VALIDP is .TRUE., while others might
assume its execution is unconditional.
(At present, g77 does not diagnose code that
violates this restriction.)