Command LIST Foundation
Outputs records and/or displays them on the screen.
LIST <Expression,...> ;
[FOR <lForCondition>] ;
[WHILE <lWhileCondition>] ;
[NEXT <nCount>] ;
[RECORD <xRecordID>] ;
[TO FILE <cFilename>] ;
[TO PRINTER] ;
[REST] ;
[ALL] ;
[OFF]
The command LIST outputs the values of the expression list <Expression,...> in table form. The values are separated by blank spaces. LIST does not display column headings and processes the data records in the current work area sequentially. The expression list is output for each record matching the conditions or until the specified number of records have been output. During processing of the records, the display is not paused. LIST is identical to the command DISPLAY, except for the default number of records. For LIST, the default option is ALL (all records are output).
The command LIST outputs the values of <Expression,...> on the screen. The output can also be sent to the printer or to a file using the options TO PRINTER or TO FILE. To suppress output on the screen, the command SET CONSOLE OFF must be specified before the call of LIST.
records marked for deletion are not output when SET DELETED is turned ON. Otherwise, the deletion flag is identified in the output by an asterisk (*).
The function DbList() is the functional equivalent of LIST.
// In the example, all parts from an inventory file
// where the inventory quantity is less than the minimum
// inventory level are listed. This creates and prints
// out an order list.
PROCEDURE Main
USE Inventry NEW
LIST PartNo, Part, OnStock, MinAmount TO PRINTER ;
FOR OnStock < MinAmount
USE
RETURN
// The example shows how the screen display can be paused
// after each MaxRow() rows and how the option to terminate
// output using the ESC key can be provided.
#include "Inkey.ch"
PROCEDURE Main
LOCAL nCount := 0
USE Customer NEW
LIST LName, FName, Phone ;
WHILE IIf( ++nCount % MaxRow()==0, Inkey(0)<>K_ESC, .T. )
USE
RETURN
If you see anything in the documentation that is not correct, does not match your experience with the particular feature or requires further clarification, please use this form to report a documentation issue.