FORTRAN Reference Manual

Program Compilation
FORTRAN Reference Manual528615-001
9-12
Source Listing
The compiler inserts a line that identifies the source input file being read when it begins
to read a different source file defined by a SOURCE directive and when it finishes
reading the source file.
The format of the inserted print line image is:
Source file: [n] file-name yyyy-mm-dd hh:mm:ss
where:
[n]
is the file ordinal (same as in the listing page title),
file-name
is the fully qualified source file name
yyyy-mm-dd hh:mm:ss
is the date and time file-name was last modified.
The compiler prints error messages and warning messages in the output listing. Note,
however, that error messages are associated with FORTRAN statements, not lines.
Because of the FORTRAN continuation line convention, it is impossible for the
compiler to know that it has seen the last line of a statement until it sees the first line of
the next statement: the compiler accumulates the entire statement before it parses the
line. Therefore, an error or warning message in the source listing could refer to any
item in the preceding statement (including comment lines and blank lines) and is not
restricted to the physical preceding line.
If FORTRAN detects a syntax error and you use the NOLIST or SUPPRESS directives
to disable listing, FORTRAN displays the text of the last line it read, its EDIT line
number, and the ordinal of the file from which the line was read before it writes the
error message. However, as noted in the preceding paragraph, the error or warning
message refers to the entire last statement, not just to the last line whose text it
displays.
If the MAP, CODE, or ICODE option is in effect, the specified list items follow each
program unit. The MAP output for each program unit is in two parts: the code and
38. 460 PRINT *, ' '
39. PRINT *, ' '
40. PRINT *, 'Sum of property values is ', tvalue
41. PRINT *, 'Total tax is ', ttax
42. PRINT *, 'Average property values is ', avalue
43. PRINT *, 'Average tax charge is ', atax
44. 500 END
Example 9-1. Compiler Listing—Source Listing (page 2 of 2)