PRB: Error 2136 "REAL Indefinite", DREAL Used with COMPLEX*16
PSS ID Number: Q10637
Article last modified on 02-09-1993

3.20

MS-DOS


----------------------------------------------------------------------
The information in this article applies to:

 - Microsoft FORTRAN for MS-DOS, version 3.2
----------------------------------------------------------------------

Summary:

SYMPTOMS
   An attempt to run an application fails and the following message
   appears:

      ? Error: REAL Indefinite (uninitialized or previous error)
        Error Code 2136

CAUSE
   The application uses the DREAL intrinsic function to obtain the
   double-precision real part of a COMPLEX*16 value.

RESOLUTION
   To work around this problem, perform one of the following steps:

    - Modify the source code to use a single-precision COMPLEX number
      with the REAL function.

    - Modify the source code to remove the DREAL function.

STATUS
   Microsoft has confirmed this to be a problem in FORTRAN version 3.2
   for MS-DOS. This problem was corrected in FORTRAN version 3.3 for
   MS-DOS.

More Information:

The following code example demonstrates this problem.

Sample Code
-----------

C Compile options needed: None

      PROGRAM TEST
      COMPLEX*16 A
      REAL*8 Y

      A = DCMPLX(-.121E+04, .406E+04)
      WRITE(*, '(3H A=, 2E10.3)')A
      Y = DREAL(A)
      WRITE(*, '(10H DREAL(A) = , E10.3)')Y
      END

Additional reference words: 3.20

=============================================================================

Copyright Microsoft Corporation 1993.
