ets question

Serge Aleynikov serge@REDACTED
Mon May 9 22:49:38 CEST 2005


Hi All,

I have the following question about ets:select_delete().  What do you 
think this function t() should return?

-include_lib("stdlib/include/ms_transform.hrl").

t() ->
     a = ets:new(a, [named_table]),
     true = ets:insert(a, {1,2}),
     M = ets:fun2ms(fun({1,2}) -> object() end),
     [{1,2}] = ets:select(a, M),
     ets:select_delete(a, M).

I would expect it to return 1, yet it returns 0.  What am I missing?

Thanks.

Serge





More information about the erlang-questions mailing list