home *** CD-ROM | disk | FTP | other *** search
- /*
- Listing: 17.5 Env_stack()
- Author: Joe Booth
- Excerpted from "Clipper 5: A Developer's Guide"
- Copyright (c) 1991 M&T Books
- 501 Galveston Drive
- Redwood City, CA 94063-4728
- (415) 366-3600
- */
-
- //───── NOTE: must compile with the /N option!
-
- function Env_Stack(push)
- static setstack_:={}
- local i
- if push == nil
- push := .T.
- endif
- if push
- aadd(setstack_, SetArray())
- else
- for i = 1 to len(setstack_[len(setstack_)])
- set(i, setstack_[len(setstack_), i])
- next i
- asize(setstack_, len(setstack_) -1)
- endif
- return NIL
-
-
- function SetArray
- local i, s_ := {}
- for i = 1 to _SET_COUNT
- Aadd(s_,set(i))
- next i
- return s_
-
- // end of file CHP1705.PRG
-