From: Eduardo M Kalinowski, ekalin@base.com.br

    [ Hey! That's me! -emk ]

    I'm presenting you SMPURGE: SMart PURGE. It works exactly like
PURGE, with one difference. It will purge whatever you tell it to. If
the argument is a variable name, that variable will be purged like with
the ordinary PURGE. If it is a directory name, the directory will be
purged, instead of receiving an annoying "Directory not allowed" error
message. And if the argument is in the form :PORT:LIBNUM object, the
library will be dettached and purged automaticaly. Also works for lists
of any combination of the above.
    The program must be called SMPURGE, because it is recursive.
However, you can change the source code and give it another name.
    I suppose the program is completely idiot-proof, because a friend of
mine used it and was not able to crash, and if he can't crash it no one
can.
    Here's the source code:

::
  CK1NOLASTWD            ( Requires one argument )
  CK&DISPATCH0
  SIX                    ( global name )
  ::
    DUP                  ( get a copy of the name )
    XEQRCL               ( recall its contents)
    TYPERRP?             ( is it a directory? )
    ITE
    XEQPGDIR             ( yes, then purge a directory )
    PURGE                ( no, then purge a variable)
  ;
  THIRTEEN               ( :PORT:LIBNUM )
  ::
    DUP                  ( get a copy )
    STRIPTAGS            ( remove the tags )
    PTR 21495            ( detach )
    PTR 217F1            ( purge )
  ;
  EIGHT                  ( PICT )
  XEQPURGEPICT           ( purge PICT )
  FIVE                   ( list )
  ::
    INNERCOMP            ( OBJ-> )
      #1+_ONE_DO         ( loop through all elements of the list )
      ID SMPURGE         ( call itself to purge whatever it is)
    LOOP
  ;
;

--
Eduardo M Kalinowski
-------------------------------
mailto:ekalin@base.com.br
http://hp48g.home.ml.org
AIM: EdvarMK     ICQ: 10944368
