New function of ets gives back a integer instead of atom
1> A=ets:new(hello,[set]).
126999
It returns an identifier whose type is not defined, currently an integer. If you create a named table then the identifier will be an atom which is its name. So for example:
1> A = ets:new(hello, [set,named_table]).
hello.
2> A.
hello
The table name can now be used as its identifier. This is similar to "naming" processes by registering them.
ets:new/2
is supposed to return a table identifier of typtid()
. That identifier should be sent to otherets
functions to tell what table you are working on.The identifier now happens to be an integer, but you should not count on that (you cannot add two identifiers together, for example). Only ever use it as an ETS table identifier.