[erlang-questions] small ETS wierdness...
Sat Oct 18 12:06:32 CEST 2008
ah, I see
thank you. I've read this line, and have it in my notes, but have not
thought about it (what is the point of having it in my notes then ;) ).
Bob Ippolito wrote:
> Take a closer look at the documentation for ets:new/2
> Particularly these lines (my emphasis):
> The parameter Options is a list of atoms which specifies table type,
> access rights, key position and if the table is named or not. If one
> or more options are left out, the default values are used. This means
> that not specifying any options () is the same as specifying
> named_table ***If*** this option is present, the name Name is
> associated with the table identifier. The name can then be used
> instead of the table identifier in subsequent operations.
> On Sat, Oct 18, 2008 at 1:19 AM, deepblue_other <cktgatb@REDACTED> wrote:
>> so this is pretty minor yet is slightly pissing me off...
>> ets:new(tableName,) creates the table with name tableName... why in all
>> examples people use the ID returned by this func, instead of using the
>> tableName as a reference in other ops. Its their choice, but when I try
>> use tableName in for example ets:info(tableName) it tells me its
>> and all the other ets: functions also fail with badArg when I use the
>> tableName atom instead of the table ID returned from ets:new().
>> same thing is not an issue with dets:
>> View this message in context:
>> Sent from the Erlang Questions mailing list archive at Nabble.com.
>> erlang-questions mailing list
> erlang-questions mailing list
View this message in context: http://www.nabble.com/small-ETS-wierdness...-tp20045004p20045656.html
Sent from the Erlang Questions mailing list archive at Nabble.com.
More information about the erlang-questions