Export (0) Print
Expand All
Expand Minimize
0 out of 1 rated this helpful - Rate this topic

DISPLAY MEMORY Command

Displays the current contents of variables and arrays.


DISPLAY MEMORY [LIKE FileSkeleton]
   [TO PRINTER [PROMPT] | TO FILE FileName [ADDITIVE]] [NOCONSOLE]

Parameters

[LIKE FileSkeleton]

Displays information about variables and arrays that match the skeleton pattern FileSkeleton. If you include LIKE FileSkeleton, Microsoft Visual FoxPro displays only the contents of variables and arrays that match FileSkeleton. FileSkeleton supports wildcards such as ? and *. For example, to display all variables that begin with the letter A, issue:

DISPLAY MEMORY LIKE A*
[TO PRINTER [PROMPT]

Directs output from DISPLAY MEMORY to a printer.

You can include the optional PROMPT clause to display a dialog box before printing starts. In this dialog box, you can adjust printer settings, including the number of copies and page numbers to print. The printer settings that you can adjust depend on the currently installed printer driver. Place the PROMPT keyword immediately after TO PRINTER.

TO FILE FileName[ADDITIVE]]

Directs output from DISPLAY MEMORY to the file specified with FileName. If the file already exists and SET SAFETY is ON, you are prompted to overwrite the file.

ADDITIVE specifies to append output to the end of the specified file. If you omit ADDITIVE, the file is overwritten with the value of the expression.

[NOCONSOLE]

Suppresses output to the main Visual FoxPro window or to the active user-defined window.

DISPLAY MEMORY displays the name, type, contents, scope, and status of all currently defined variables and variable arrays. It includes the number of variables defined, the number of bytes used, and the number of additional variables available. DISPLAY MEMORY also displays information about system variables, menus, menu bars, menu titles, and windows.

NoteNote

The number of bytes used represents memory used by character type variables. Character type variables are the only type of variables that require additional memory beyond that allocated by the variable count specified with the MVCOUNT configuration item.

In the following example, several variables are created and assigned values. DISPLAY MEMORY first displays all variables that begin with "sam" and then displays all variables that contain five letters and end with "exit."

STORE 'Goodbye' TO sample1
STORE 'Hello' TO sample2
STORE .T. TO texit
STORE .F. TO mexit

CLEAR
DISPLAY MEMORY LIKE sam*
DISPLAY MEMORY LIKE ?exit
Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.