Microsoft KB Archive/51295

From BetaArchive Wiki
< Microsoft KB Archive
Revision as of 17:57, 18 July 2020 by 3155ffGd (talk | contribs) (importing KB archive)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Article ID: 51295

Article Last Modified on 12/1/2003



APPLIES TO

  • Microsoft FORTRAN Compiler 5.0
  • Microsoft FORTRAN Compiler 5.1
  • Microsoft FORTRAN PowerStation 1.0 Standard Edition
  • Microsoft Fortran PowerStation 1.0a for MS-DOS
  • Microsoft FORTRAN PowerStation 32
  • Microsoft FORTRAN Compiler 5.0
  • Microsoft FORTRAN Compiler 5.1



This article was previously published under Q51295

SYMPTOMS

When the FORTRAN compiler processes a source code file, it produces the following warning message:

F4998: variable used but not defined

CAUSE

The file contains a variable that is used as an argument in an intrinsic function before it is assigned a value.

RESOLUTION

This behavior is expected and serves as a warning.

MORE INFORMATION

The following list of intrinsic functions are confirmed to produce this warning message:

abs, exp, ior, loc, locfar, locnear,
log, max, mod, not, sin, sqrt, tan


The following code example demonstrates this warning message.

Sample Code #1

C Compile options needed: None

      REAL TMP
      WRITE (*, *) SIN(TMP)
      END
                

The following code example eliminates this warning message by assigning a value to TMP before using it as an argument to an intrinsic function.

Sample Code #2

C Compile options needed: None

      REAL TMP
      TMP = 1
      WRITE (*, *) SIN(TMP)
      END
                


Additional query words: 1.00 5.00 5.10

Keywords: KB51295