home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 5 / 05.iso / a / a075 / 1.img / TOOLKIT1.EXE / SST76.PRG < prev    next >
Encoding:
Text File  |  1989-08-08  |  2.1 KB  |  82 lines

  1. ********************
  2.  
  3. FUNCTION Mid_way
  4.  
  5.    PARAMETERS the_way, ttitles, bkpoint, the_page
  6.  
  7.    the_page = IF(PCOUNT() = 4, -1, the_page)
  8.  
  9.    DO CASE
  10.    CASE the_way = 1
  11.  
  12.       * If printing to the screen, check to see if the line count
  13.       * is > 15.   If it is not, return TRUE to continue 
  14.       * the printing; otherwise, interrupt the printing with a prompt to
  15.       * continue. If printing is not to the screen, return a FALSE value.  
  16.       * If printing is to proceed, redisplay the header and re-set the counter
  17.  
  18.       IF bkpoint > 18
  19.          @ 24,00 SAY "Press Any Key for Next Screen or Q to QUIT"
  20.          IF QWAIT("Q")
  21.             bkpoint = 70                      
  22.             RETURN(.F.)
  23.          ENDIF
  24.  
  25.          bkpoint = 7
  26.          @ 8,0 CLEAR
  27.          RETURN(.T.)
  28.       ELSE
  29.          RETURN(.T.)
  30.       ENDIF
  31.  
  32.    CASE the_way = 2
  33.       IF TYPE("scrpage") = "U"
  34.          scrpage = .F.
  35.       ENDIF
  36.  
  37.       IF INKEY() # 27
  38.          IF bkpoint > 55
  39.             IF scrpage .AND. the_page <> -1
  40.                ?
  41.                ?
  42.                say_what = "Page " + LTRIM(TRIM(STR(the_page)))
  43.                ? Mess_cent(say_what,40)
  44.                the_page = the_page + 1
  45.             ENDIF
  46.             EJECT
  47.             Header_p(ttitles, the_way, 79)
  48.             bkpoint = 7
  49.           ENDIF
  50.  
  51.          RETURN(.T.)
  52.       ELSE
  53.          SET PRINT OFF
  54.          SET CONSOLE ON
  55.          Clear_area()
  56.          temp_var = "ESC to abort or any other key to print"
  57.          @ Wrow(1),Center(temp_var, 40) SAY temp_var
  58.          IF INKEY(0) = 27
  59.             RETURN(.F.)
  60.          ELSE
  61.              IF !ISPRINTER()
  62.                 Clear_area()
  63.                 @ Wrow(1), Wcol(3) SAY "Printer NOT on-line.  Any key to RETURN"
  64.                 INKEY(0)
  65.                 RETURN(.F.)
  66.              ENDIF
  67.          ENDIF
  68.       ENDIF
  69.       temp_var = "Resume printing report.  One Moment!"
  70.       Clear_area()
  71.       @ Wrow(1),Center(temp_var,40) SAY temp_var
  72.       SET CONSOLE OFF
  73.       SET PRINT ON
  74.       RETURN(.T.)
  75.    OTHERWISE
  76.       RETURN(.T.)
  77.    ENDCASE
  78.    
  79. * End of File
  80.  
  81.  
  82.