BUG: F4999 from Item Not in COMMON Initialized in Block Data

ID: Q77902


The information in this article applies to:
  • Microsoft FORTRAN for MS-DOS, version 5.1
  • Microsoft FORTRAN for OS/2, version 5.1
  • Microsoft FORTRAN PowerStation for MS-DOS, versions 1.0, 5.0
  • Microsoft Fortran Powerstation 32 for Windows NT, versions 1.0, 4.0


SYMPTOMS

The following error message is generated when compiling a FORTRAN program which initializes a variable within a Block Data subprogram, but the variable is not contained in a COMMON block:

Under Fortran Powerstation 32 1.0

warning F4999: variable declared but not used
Under Fortran PowerStation 4.0
warning FOR4280: unused local variable


RESOLUTION

To eliminate the warning, put the variable in a COMMON block.


STATUS

Microsoft has confirmed this to be a bug in the products listed above. We are researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.


MORE INFORMATION

The following code will produce the F4999 error message with the COMMON block commented out:


      block data

C      common /tst/ i

      data i /1/ 
      end

      program test
      common /tst/ i
      write(*,*) i
      end 

Additional query words: 5.10 1.00 1.00a 4.00

Keywords : kberrmsg kbLangFortran
Version : :1.0,4.0,5.0,5.1
Platform : MS-DOS NT OS/2 WINDOWS
Issue type :


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