I have weird behavior in erlang using ets: select.
I get the correct select statement (4 and 5 below), then I make a mistake in my statement (see below), and then again I try to fulfill the same statement as in 4 and 5, and it no longer works.
What's happening? any idea?
Erlang R14B01 (erts-5.8.2) [source] [smp:2:2] [rq:2] [async-threads:0] [kernel-poll:false] Eshell V5.8.2 (abort with ^G) 1> Tab = ets:new(x, [private]). 16400 2> ets:insert(Tab, {c, "rhino"}). true 3> ets:insert(Tab, {a, "lion"}). true 4> ets:select(Tab,[{{'$1','$2'},[],['$1', '$2']}]). ["rhino","lion"] 5> ets:select(Tab,[{{'$1','$2'},[],['$1', '$2']}]). ["rhino","lion"] 6> ets:select(Tab,[{{'$1','$2'},[],['$1', '$2', '$3']}]). ** exception error: bad argument in function ets:select/2 called as ets:select(16400,[{{'$1','$2'},[],['$1','$2','$3']}]) 7> ets:select(Tab,[{{'$1','$2'},[],['$1', '$2']}]). ** exception error: bad argument in function ets:select/2 called as ets:select(16400,[{{'$1','$2'},[],['$1','$2']}])
Is my table table killed? Will this be an ets error?
Thanks.