home *** CD-ROM | disk | FTP | other *** search
- /*
- Listing 15.3. Sending printer control codes.
- Author: Craig Yellick
- Excerpted from "Clipper 5: A Developer's Guide"
- Copyright (c) 1991 M&T Books
- 501 Galveston Drive
- Redwood City, CA 94063-4728
- (415) 366-3600
- */
-
-
- function Main()
- /*
- List the contents of the VENDOR database,
- put address in condensed type so it fits on one line.
- Condensed on = chr(15)
- Condensed off = chr(18)
- */
- use vendor new
- goto top
- set device to printer
- setprc(0,0)
- do while .not. vendor->(eof())
- @ prow() +1, 0 say vendor->ID
- @ prow(), pcol() +2 say vendor->Name
- @ prow(), pcol() say chr(15)
- @ prow(), pcol() +2 say vendor->Address
- @ prow(), pcol() +2 say vendor->City
- @ prow(), pcol() +2 say vendor->State
- @ prow(), pcol() +2 say vendor->Zip
- @ prow(), pcol() say chr(18)
- skip alias vendor
- enddo
- eject
- set device to screen
- quit
- return nil
-
- // end of file CHP1503.PRG
-