[erlang-questions] How to find an object in an ETS table ?

Robert Raschke rtrlists@REDACTED
Fri Nov 26 17:47:55 CET 2010


On Fri, Nov 26, 2010 at 4:34 PM, info <info@REDACTED> wrote:

> Yes !
> My syntax was bad.
> Suppose that the key is unique (should be defined) but not the value:
>
> ets:insert(E,{123,2}),
> ets:insert(E,{456,2}),
>
> ets:match(E,{'$1',2}),
> gives me a strange result:
> ["{",[456]]
> I was expected a list of keys or a list of {key,value}
>
>
>
That's an artifact of the shell trying to be clever when printing lists that
look like strings:

58> [[123],[456]].
["{",[456]]

Robby


More information about the erlang-questions mailing list