home *** CD-ROM | disk | FTP | other *** search
- *****************************************************************
- ** File = F_GETS.PRG ** Functions: SAVEGETS, RESTGETS
- *****************************************************************
-
- * Copyright(c) 1991 -- James Occhiogrosso
-
- * Create static array for current GETS, counter for nesting count
- STATIC getstack := {}, counter := 0
-
- *****************************************************************
- FUNCTION SAVEGETS // Saves currently active GETS on getstack
- *****************************************************************
-
- * Return with no action if getlist is undefined or empty
-
- IF TYPE('getlist') = 'A' .AND. LEN(getlist) > 0
-
- * Add public getlist array to stack array (getstack)
- AADD(getstack, getlist)
-
- * Increment stack counter
- counter++
-
- * Clear current GETS and return
- CLEAR GETS
-
- ENDIF
-
- RETURN NIL
-
-
- *****************************************************************
- FUNCTION RESTGETS
- *****************************************************************
-
- * Restores and reactivates last set of pending GETS
-
- IF counter > 0
-
- * Add of last set of GETS back to getlist array
- getlist = getstack[counter--]
-
- * Resize internal stack
- ASIZE(getstack, counter)
-
- ENDIF
-
- RETURN NIL
-
-
-