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

ID: Q77902

5.10 1.00 1.00a | 5.10 | 1.00 4.0

MS-DOS          | OS/2 | WINDOWS NT

The information in this article applies to:

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 reference words: 5.10 1.00 1.00a 4.00 KBCategory: KBSubcategory: FLIss
Keywords          : kberrmsg kbLangFortran 
Version           : 5.10 1.00 1.00a | 5.10 | 1.00 4.
Platform          : MS-DOS NT OS/2 WINDOWS

Last Reviewed: May 23, 1998