Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- CA-Clipper 5.2 . The Guide To CA-Clippe - <b>display</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 DISPLAY
 Display records to the console
------------------------------------------------------------------------------
 Syntax

     DISPLAY <exp list>
        [TO PRINTER] [TO FILE <xcFile>]
        [<scope>] [WHILE <lCondition>]
        [FOR <lCondition>] [OFF]

 Arguments

     <exp list> is the list of values to display for each record
     processed.

     TO PRINTER echoes output to the printer.

     TO FILE <xcFile> echoes output to the indicated file which can be
     specified either as a literal filename or as a character expression
     enclosed in parentheses.  If an extension is not specified, (.txt) is
     added.

     <scope> is the portion of the current database file to DISPLAY.  The
     default is the current record, or NEXT 1.  If a condition is specified,
     the scope becomes ALL.

     WHILE <lCondition> specifies the set of records meeting the
     condition from the current record until the condition fails.

     FOR <lCondition> specifies the conditional set of records to DISPLAY
     within the given scope.

     OFF suppresses the display of the record number.

 Description

     DISPLAY is a database command that sequentially accesses records in the
     current work area sending the results of the <exp list> to the console
     in a tabular format with each column separated by a space.  The command
     does not display column headers or pause at predetermined intervals.
     DISPLAY is identical to LIST with the exception that its default scope
     is NEXT 1 rather than ALL.

     When invoked, output is sent to the screen and optionally to the printer
     and/or a file.  To suppress output to the screen while printing or
     echoing output to a file, SET CONSOLE OFF before the DISPLAY command
     line.

 Notes

     .  Interrupting output: To let the user interrupt the processing
        of a DISPLAY command, using the INKEY() function, add a test for the
        interrupt key press to the FOR condition.  See the example below.

     .  Printer margin: Since DISPLAY is a console command, it honors
        the current SET MARGIN for output echoed to the printer.

 Examples

     .  This example illustrates a simple DISPLAY, and a conditional
        DISPLAY to the printer:

        USE Sales NEW
        DISPLAY DATE(), TIME(), Branch
        DISPLAY Branch, Salesman FOR Amount > 500 TO PRINTER

     .  This example interrupts a DISPLAY using INKEY() to test
        whether the user pressed the Esc key:

        #define K_ESC  27
        USE Sales INDEX SalesMan NEW
        DISPLAY Branch, Salesman, Amount WHILE ;
           INKEY() != K_ESC

 Files:  Library is CLIPPER.LIB.

See Also: DBEVAL() INKEY() LIST SET MARGIN

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson