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

  1. /*
  2.    Listing 15.14. Introducing NextRow() and SameRow().
  3.    NOTE: This is a code fragment... do not compile and use as-is!!
  4.    Author: Craig Yellick
  5.    Excerpted from "Clipper 5: A Developer's Guide"
  6.    Copyright (c) 1991 M&T Books
  7.                       501 Galveston Drive
  8.                       Redwood City, CA 94063-4728
  9.                       (415) 366-3600
  10. */
  11.  
  12. #define TOP_MAR   4
  13. #define BOT_MAR   6
  14. #define PAGE_LEN  66
  15.  
  16. function Main()
  17. /*
  18.    The same "meat" loop as before, but this time
  19.    using two helpful mystery functions.
  20. */
  21.   do while .not. vendor->(eof())
  22.     if PageEject(page_len, top_mar, bot_mar)
  23.       page_number++
  24.       PageHead(sys_title, rpt_title, rpt_id, ;
  25.                page_width, left_mar, right_mar, page_number)
  26.       NextRow(2, left_mar, col_head1)
  27.       NextRow(1, left_mar, col_head2)
  28.     endif
  29.     NextRow(1, left_mar, Vendor->Name)
  30.     SameRow(2, Vendor->Address)
  31.     SameRow(2, Vendor->YTD, "$9,999.99")
  32.     SameRow(6, if(Vendor->Contract, "Yes", "No"))
  33.     skip alias vendor
  34.   enddo
  35. return nil
  36.  
  37. // end of file CHP1514.PRG
  38.