The information in this article applies to:
SYMPTOMSUsing Microsoft FORTRAN 5.0 or 5.1 to compile a program that uses mixed data types in an expression can cause the compiler to hang the machine under DOS, generate a protection violation under OS/2, or result in the following error: In some cases, the compiler will generate the following error: Explicitly converting all variables and constants to the same type will suppress the error. In some cases, the error is suppressed by optimization (for example, using /Ox, or by not using the /Od compiler option during compilation). In other cases, the problem is more severe when using optimization. CAUSEThe following sample programs illustrate the problems. Using COMPLEX and REAL Data Types
The above program must be compiled with the /Od switch to cause the
code generation error. In some cases, the /FPc option may be
necessary to generate F2124.
Using COMPLEX instead of COMPLEX*16 will generate the following error:
Using REAL and INTEGER Data Types
Compiling this program under DOS without the /Od compiler option will
cause the compiler to hang the computer. When compiling under OS/2, a
protection violation is generated by the second pass of the compiler.
Using the /Od compiler option results in the following error:
RESOLUTIONExplicitly converting the type of all of the variables or constants to the same type will prevent the errors, as illustrated by the following sample programs: Using COMPLEX and REAL Data Types
Using REAL and INTEGER Data Types
STATUSMicrosoft has confirmed this to be a problem in Microsoft FORTRAN versions 5.0 and 5.1 for MS-DOS and OS/2. This problem was corrected in FORTRAN PowerStation. Additional query words: 5.00 5.10
Keywords : |
Last Reviewed: November 2, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |