Nokie's Purge

From Gwen Morse's Wiki
Jump to: navigation, search
;<----------------------------------------------------------->
;< <INTERNAL> - used to purge variables
;< Written by: Nokie Quickfingers (jeff at billimek dot com)
;< 01/23/2002
;<----------------------------------------------------------->
/def purge_vars = \
        /let purge_vars=$(/listvar -s %{*})%;\
        /let off=$[strchr(purge_vars," ")]%;\
        /while (off>-1) \
          /unset $[substr(purge_vars,0,off)]%;\
          /let purge_vars=$[substr(purge_vars,off+1)]%;\
          /let off=$[strchr(purge_vars," ")]%;\
        /done%;\
        /unset %purge_vars%;