C5_SET DEVICE

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, 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()



Advertisements

6 responses to “C5_SET DEVICE

  1. Pingback: C5 UI Global Settings | Viva Clipper !

  2. Pingback: C5 User Interface | Viva Clipper !

  3. Pingback: C5 Commands | Viva Clipper !

  4. Pingback: C5 Commands | Viva Clipper !

  5. Pingback: C5_SET PRINTER | Viva Clipper !

  6. Pingback: C5_SET MARGIN | Viva Clipper !

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.