home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 5 / 05.iso / a / a012 / 1.ddi / CHAP15.EXE / CHP1503.PRG < prev    next >
Encoding:
Text File  |  1991-04-30  |  1.0 KB  |  40 lines

  1. /*
  2.    Listing 15.3. Sending printer control codes.
  3.    Author: Craig Yellick
  4.    Excerpted from "Clipper 5: A Developer's Guide"
  5.    Copyright (c) 1991 M&T Books
  6.                       501 Galveston Drive
  7.                       Redwood City, CA 94063-4728
  8.                       (415) 366-3600
  9. */
  10.  
  11.  
  12. function Main()
  13.   /*
  14.      List the contents of the VENDOR database,
  15.      put address in condensed type so it fits on one line.
  16.      Condensed on = chr(15)
  17.      Condensed off = chr(18)
  18.   */
  19.   use vendor new
  20.   goto top
  21.   set device to printer
  22.   setprc(0,0)
  23.   do while .not. vendor->(eof())
  24.     @ prow() +1, 0 say vendor->ID
  25.     @ prow(), pcol() +2 say vendor->Name
  26.     @ prow(), pcol() say chr(15)
  27.     @ prow(), pcol() +2 say vendor->Address
  28.     @ prow(), pcol() +2 say vendor->City
  29.     @ prow(), pcol() +2 say vendor->State
  30.     @ prow(), pcol() +2 say vendor->Zip
  31.     @ prow(), pcol() say chr(18)
  32.     skip alias vendor
  33.   enddo
  34.   eject
  35.   set device to screen
  36.   quit
  37. return nil
  38.  
  39. // end of file CHP1503.PRG
  40.