ID: Q84594
5.00 5.10 1.00 1.00a | 5.00 5.10 | 1.00
MS-DOS | OS/2 | WINDOWS NT
FL32Iss
The information in this article applies to:
When a variable is a part of an expression that is an actual argument in a CALL statement but is not otherwise defined, Microsoft FORTRAN does not generate the F4998 "variable used but not defined" warning message even though the compiler is designed to do so.
Normally, the compiler does not check actual arguments to verify that a value has been assigned to an argument. When a CALL statement uses an expression as its actual argument, the compiler should check all components of the expression to verify that the application assigned a value to each of them.
To ensure that this warning message occurs for each variable in an expression used in a CALL statement, modify the source code to assign each expression to a temporary variable and specify the temporary variable as the argument in the CALL statement.
Microsoft has confirmed this to be a bug in the products listed above. This problem was corrected in FORTRAN PowerStation version 4.0.
The code example below demonstrates this problem. The F4998 warning does not occur for I even though no value was assigned to it.
C Compile options needed: None
CALL X (I + 1)
END
In the code example below, the F4998 warning message occurs as
expected.
C Compile options needed: None
K = I + 1
CALL X (K) ! using temporary variable in CALL statement
END
Additional reference words: 5.00 5.10 1.00 1.00a
KBCategory:
KBSubcategory: FL32Iss
Keywords : kberrmsg kbCompiler kbFL32 kbFortranPS
Version : 5.00 5.10 1.00 1.00a | 5.00 5.10
Platform : MS-DOS NT OS/2 WINDOWS
Solution Type : kbfix
Last Reviewed: May 23, 1998