BUG: Compiler Errors in INCLUDE Files Not in Listing File

ID: Q67167


The information in this article applies to:
  • Microsoft FORTRAN for MS-DOS, versions 5.0, 5.1
  • Microsoft FORTRAN for OS/2, versions 5.0, 5.1


SYMPTOMS

When a compiler error occurs in an INCLUDE file, the compiler error messages do not appear in the source listing file generated by the Microsoft FORTRAN version 5.0 or 5.1 compiler. However, the total number of detected errors tallied at the end of the listing file is correct.

NOTE: Source listings are not supported in FORTRAN PowerStation.


STATUS

Microsoft has confirmed this to be a problem in FORTRAN versions 5.0 and 5.1.


MORE INFORMATION

When the FL command is issued with the /Fs option, a source listing file is created that should contain any compiler errors next to the line of source code that generated the error. The errors are also sent to the screen and subsequently to the M editor, if compilation is being done from within the editor. If a compiler error is generated on a source line in an INCLUDE file, the error is correctly flagged on output to the screen and consequently to the editor, but not correctly inserted into the source listing file.

In the following code, the INCLUDE file has one error (which is not flagged in the listing file), and the program source file has one error to demonstrate how the listing file should flag errors.

Source file (myprg.for):


      program main
      include 'test'
      write(*,*) 'This is a test'
      writ(*,*) 'This is also a bad line'
      end 
Include file (test):

      writ(*,*) 'This is a bad line' 
List file:


PAGE   1

11-14-90

03:09:12

 Line#  Source Line          Microsoft FORTRAN Optimizing Compiler
Version 5.00

     1        program main
     2        include 'test'
      ***** Begin listing of: test
     1        writ(*,*) 'This is a bad line'
      ***** End listing of: test
     3        write(*,*) 'This is a test'
     4        writ(*,*) 'This is also a bad line'
***** myprg.for(4) : error F2115: syntax error
     5        end

2 errors detected 

Additional query words: 5.00 5.10 nofps

Keywords :
Version : :5.0,5.1
Platform :
Issue type :


Last Reviewed: November 2, 1999
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.