PRB: Memory Not Displayed Correctly for Numeric Data

Last reviewed: June 27, 1995
Article ID: Q126271
The information in this article applies to:
  • Microsoft FoxPro for Windows, version 2.6a

SYMPTOMS

When you use the DISPLAY MEMORY command to find out how much memory is being used for memory variables, the value displayed for numeric variables is incorrect.

CAUSE

The DISPLAY MEMORY command is only intended to display the memory taken by string data, which varies in length. Other data types, such as numerical, are stored within the memory variable itself which is a fixed-size structure.

STATUS

This behavior is by design.

MORE INFORMATION

Steps to Reproduce Behavior

  1. Type the following commands in the Command window:

    SET PDSETUP TO RELEASE _PDPARMS CLEAR MEMORY

    MVAR1=12345 MVAR2=4567 DISPLAY MEMORY

    The following information regarding MVAR1 and MVAR2 is displayed:

       MVAR1   PUB   N   12345......
       MVAR2   PUB   N   45678.......
       2 variables defined,     0 bytes used
    
    

  2. Type the following commands in the Command window:

    CLEAR MEMORY MVAR3="ABCD" MVAR4="XYZ" DISPLAY MEMORY

    The following information regarding MVAR3 and MVAR4 is displayed:

       MVAR3  PUB   C   "ABCD"
       MVAR4  PUB   C   "XYZ"
       2 variables defined,     21 bytes used
    


Additional reference words: FoxWin 2.60a
KBCategory: kbenv
KBSubcategory: FxenvMemory


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: June 27, 1995
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.