home *** CD-ROM | disk | FTP | other *** search
- /*
- Listing 6.10 Example of File-wide STATIC Variables
- (use in conjunction with file CHP0610A.PRG)
- Author: Greg Lief
- 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
- */
-
- //───── must compile with /N option!
-
- static buffer
-
- function gsavescrn(t, l, b, r)
- /* establish default window parameters if not passed */
- t := if(t == NIL, 0, t)
- l := if(l == NIL, 0, l)
- b := if(t == NIL, maxrow(), b)
- r := if(t == NIL, maxcol(), r)
- buffer := { t, l, b, r, savescreen(t, l, b, r) }
- return nil
-
-
- function grestscrn
- restscreen(buffer[1], buffer[2], buffer[3], buffer[4], buffer[5])
- return nil
-
- // end of file CHP0610B.PRG
-