CURVAL()

Set Device, Set("Device"), Sys(101)

This group is more old Xbase baggage. SET DEVICE lets you redirect the output of @ .. SAYs while the two functions tell where that output is going at the moment.

Usage

SET DEVICE TO SCREEN | PRINTER [ PROMPT ] | FILE FileName cCurDevice = SET( "DEVICE" [, 1 ] ) cCurDevice = SYS( 101 )
Once upon a time, the @ .. SAY command was one way to produce reports. By twiddling the DEVICE setting, you could have the report appear either on screen, on paper or in a file. With SET("DEVICE") or SYS(101), you could even remember how it was set beforehand and restore it. If you designate a file destination, SET("DEVICE") returns "FILE" and SET("DEVICE",1) returns the destination filename.

In Visual FoxPro, @ .. SAY is a terrible way to produce reports, so there's not much reason to touch the DEVICE setting.

Incidentally, if you SET DEVICE TO PRINT, the actual output location is controlled by the setting of SET PRINT TO.

Example

SET DEVICE TO PRINT * Issue @ .. SAYs to send a report to the printer SET DEVICE TO SCREEN

See Also

@...Say, Set, Set Print


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