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

  1. /*
  2.    Listing 15.7. Getting column headings on every page.
  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. #define TOP_MAR   4
  12. #define BOT_MAR   6
  13. #define PAGE_LEN  66
  14.  
  15. function Main()
  16.   /*
  17.      Same vendor listing as before, but this time
  18.      print the column headings on every page and use
  19.      the nifty PageEject() function to help out.
  20.   */
  21.   use vendor new
  22.   goto top
  23.   set device to printer
  24.   setprc(0,0)
  25.   @ prow() +TOP_MAR, 0 say "Vendor Name"
  26.   @ prow() +1,       0 say "--------------------"
  27.   do while .not. vendor->(eof())
  28.     if PageEject()
  29.       @ prow() +1, 0 say "Vendor Name"
  30.       @ prow() +1, 0 say "--------------------"
  31.     endif
  32.     @ prow() +1, 0 say vendor->Name
  33.     skip alias vendor
  34.   enddo
  35.   eject
  36.   set device to screen
  37.   quit
  38. return nil
  39.  
  40. // end of file CHP1507.PRG
  41.