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

  1. /*
  2.    Listing 18.11 SAVE/RESTORE FILTERS
  3.    Author: Joe Booth
  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. //───── NOTE: must compile with the /N option!
  12.  
  13. STATIC fstack_:={}
  14.  
  15. function save_filt
  16. Aadd( fstack_, dbfilter() )
  17. return NIL
  18.  
  19. function rest_filt
  20. LOCAL fsize:=len(fstack_)
  21. LOCAL f_exp
  22. if fsize > 0
  23.    f_exp  := fstack_[fsize]
  24.    dbsetfilter( &("{ ||"+f_exp+"} "),;
  25.              f_exp )
  26.    Asize(fstack_,fsize-1)
  27. endif
  28. return NIL
  29.  
  30. // end of file CHP1811.PRG
  31.