How to find an object in an ETS table ?

info info@REDACTED
Fri Nov 26 16:31:32 CET 2010


Hello,

Probably an error of beginner ...
E=ets:new('my_table',[]),
ets:insert(E,{123,1}),
ets:insert(E,{456,2}),
The following command find the key 123 and return the object 1
ets:lookup(E,123),
The following command returns empty !
R1=ets:match(E,{'_',2,'$1'}),
How to find the object 2 ?

J-Ph. Constantin
ITS3 Genève
www.its3.ch


More information about the erlang-questions mailing list