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

  1. /*
  2.    Listing 15.11. Yet another version of PageEject().
  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 PageEject(length, top, bottom)
  13. /*
  14.    Eject page based on current printer row and
  15.    the parameters passed.
  16. */
  17. local need_eject := ((prow() +bottom) > length) ;
  18.                 .or. (prow() = 0)
  19.   if need_eject
  20.     if prow() > 0
  21.       eject
  22.       setprc(0,0)
  23.     endif
  24.     @ prow() +top, 0 say ""
  25.   endif
  26. return need_eject
  27.  
  28. // end of file CHP1511.PRG
  29.