_ASCIICOLS

Display and List

These two commands do more than Jack-of-all-trades. They have so many variations, it's hard to keep track of them. But fundamentally, they all come down to showing you some information about the current state of FoxPro.

The various forms of these commands are described in the pages that follow. Before we get to that, let's take a look at what's the same throughout.

By default, all the forms of both DISPLAY and LIST send output to the active window. All support optional TO PRINT and TO FILE clauses that let you send output somewhere else as well, and a NOCONSOLE clause that lets you suppress output to the active window. Unfortunately, there's no TO SCREEN clause that lets you redirect output to the main FoxPro window, so you may need to issue ACTIVATE SCREEN before a DISPLAY or LIST command.

Interestingly, the FILE keyword of TO FILE appears to be optional. Issuing DISPLAY STRUCTURE TO SCREEN results in a file called SCREEN.TXT, containing the structure of the open table. The FILE clause of these commands has an optional, undocumented ADDITIVE option to add the new listing to an existing file.

As with other commands supporting TO PRINT, there's an optional PROMPT clause that brings up the Print Setup dialog.

There are two differences between DISPLAY and LIST. DISPLAY stops when the screen (or window) is full of information and waits for a keypress to continue. LIST scrolls the output. When using the most basic form of DISPLAY or LIST, the one that simply shows data from an open table, DISPLAY has a default scope of NEXT 1 while LIST has a default scope of ALL. These differences mean that DISPLAY is a better choice for on-screen output and LIST is better for output to a printer or file.

See Also

Display, Display Connections, Display Database, Display DLLs, Display Files, Display Memory, Display Objects, Display Procedures, Display Status, Display Structure, Display Tables, Display Views, List, List Connections, List Database, List DLLs, List Files, List Memory, List Objects, List Procedures, List Status, List Structure, List Tables, List Views


View Updates

Copyright © 2002 by Tamar E. Granor, Ted Roche, Doug Hennig, and Della Martin. All Rights Reserved.



Hacker's Guide to Visual FoxPro 7. 0
Hackers Guide to Visual FoxPro 7.0
ISBN: 1930919220
EAN: 2147483647
Year: 2001
Pages: 899

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net