How to Change REAL*4 Numbers to REAL*8 Values in Debugger

Last reviewed: March 8, 1996
Article ID: Q148193
The information in this article applies to:
  • Microsoft Fortran PowerStation for Windows 95 and Windows NT, version 4.0

SUMMARY

When you want to change a REAL*8 variable's single-precision value in the debugger to a number greater than the maximum positive or negative value allowed for single-precision numbers, you must use the "D" exponent descriptor.

MORE INFORMATION

All REAL variables are initially expressed with the single-precision "E" exponent descriptor in the debugger. To change the value of a REAL*8 variable containing a single-precision number to a double-precision number, increase the size of the exponent, and change the "E" exponent descriptor to the "D" exponent descriptor.

Step-by-Step Example

  1. Build the following sample code in Developer Studio.

  2. In Developer Studio, click Debug on the Build menu, and then click Step Into to begin the debugging process.

  3. In the locals window, double-click the value associated with the Single variable. Replace the exponent part with "D+039" and press the ENTER key. This changes the value to a double-precision number.

Sample Code

C Compile options needed: /Zi

      real*8 Single

      Single = 3.40E+38

      end


Additional reference words: kbinf 4.00
KBCategory: kbprg kbusage kbhowto
KBSubcategory: FORTLngIss


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: March 8, 1996
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.