remove hashed array inside block?



On Jan 8, Richard Hennessy wrote:

> The way I do it is as follows.
>
> block
> (
>    [array1, array2, _var1, _var2],
>    local(array1,array2),
>    /* do some stuff */
>
> )$
>
> By using local this way the hashed arrays are removed automatically when 
> the block exits.  Also you can use recursive calls and it will still work, 
> (I think I have done this), the arrays are local to the block and a new 
> copy is made if you make a recursive call.
>
> Rich
>
thanks for the example of the use of local in this context.

The actual context in which this arose for me was that users
of my dirac package can
assign non-covariant values to various symbols representing
four vectors, and these become global arrays defined using
arraysetapply. I wanted to then construct a function whose
args would be the names of four vectors I wanted to
de-assign component values as in uncomp_def (p1,p2)
and I needed a way to remove these global arrays inside
a function block.

Ted