If this namespace notion would be implemented, I think you could store your static vars there.
Code:

package NetworkLib
dim $counter

function A($a, $b)
dim $counter
for = $counter = 0 + NetworkLib::$counter to 5 + NetworkLib::$counter
;do stuff
next
NetworkLib::$counter = $counter
endfunction


package Main
;more code
NetworkLib::A($foo,$bar)

;print last record processed
? "the next record to process is record number: " + NetworkLib::$counter



This probably is not what you are looking for but I think it is better than globals.
_________________________
Home page: http://www.kixhelp.com/hb/