[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 SET DEVICE
 Direct @...SAYs to the screen or printer
------------------------------------------------------------------------------
 Syntax

     SET DEVICE TO SCREEN | printer

 Arguments

     TO SCREEN directs all @...SAYs to the screen and is independent of
     the SET PRINTER and CONSOLE settings.

     TO PRINTER directs all @...SAYs to the device set with SET PRINTER
     TO.  This can include a local printer port, a network spooler, or a
     file.

 Description

     SET DEVICE directs the output of @...SAY commands to either the screen
     or the printer.  When DEVICE is SET TO PRINTER, @...SAY commands are
     sent to the printer and not echoed to the screen.  In addition, @...SAY
     commands observe the current SET MARGIN value.

     When sending @...SAYs to the printer, CA-Clipper performs an automatic
     EJECT whenever the current printhead row position is less than the last
     print row position.  An EJECT resets PCOL() and PROW() values to zero.
     To reset PCOL() and PROW() to new values, use the SETPRC() function.

     To send @...SAYs to a file, use SET PRINTER TO <xcFile> with SET DEVICE
     TO PRINTER.

 Examples

     .  This example directs @...SAYs to the printer:

        SET DEVICE TO PRINTER
        @ 2,10 SAY "Hello there"
        EJECT

     .  This example directs @...SAYs to a file:

        SET PRINTER TO Output.txt
        SET DEVICE TO PRINTER
        @ 10, 10 SAY "File is: Output.txt"
        @ 11, 10 SAY DATE()
        SET PRINTER TO            // Close the output file

        SET DEVICE TO SCREEN

 Files   Library is CLIPPER.LIB.


See Also: @...SAY EJECT PCOL() PROW() SET PRINTER SETPRC()
This page created by ng2html v1.05, the Norton guide to HTML conversion utility. Written by Dave Pearson