[DGD]removing elements from mappings

birgit.schulte at philips.com birgit.schulte at philips.com
Fri Dec 15 11:01:05 CET 2000


Boris J wrote:

> I wondering what is the proper way of removing elements (indices/values)
> from a mapping in DGD ?
> Shouldn't this work:
>
>     foo_mapping -= bar_indices;
>
> which would remove 'bar_indices' indice and it's value from the
> 'foo_mapping' mapping ?

As written by Erwin, 
    foo_mapping -= ({ bar_indice }) 

does work, only it is - especially for large mappings - way slower than 

   foo_mapping[bar_indice] = nil;

And somehow I too feel that the first form looks strange ;-)

Birgit

List config page:  http://list.imaginary.com/mailman/listinfo/dgd



More information about the DGD mailing list