[erlang-questions] dets:info/2

Joseph Wayne Norton <>
Sun Jun 30 17:09:49 CEST 2013


Tim -

Have you tried these commands using the erlang shell?

$ erl
Erlang R16B01 (erts-5.10.2) [source] [64-bit] [smp:2:2] [async-threads:10] [hipe] [kernel-poll:false]

Eshell V5.10.2  (abort with ^G)
1> dets:open_file(ingredients, [{file,"ingredients.dets"},{type,set}]).
{ok,ingredients}
2> MyInfo = dets:info(ingredients,no_objects).
0
3> 


On 2013/06/30, at 10:02, Tim <> wrote:

> Greetings,
> 
> Can anyone provide some example code of dets:info/2 in action that actually works?
> 
> I'm trying to get info on a dets table through a .yaws script and just can't get it to work.
> 
> <erl>
> out(Arg) ->
> 	dets:open_file(ingredients, [{file,"ingredients.dets"},{type,set}]),
> 	MyInfo = dets:info(ingredients,no_objects),
> 	{html, MyInfo}.
> </erl>
> 
> The error occurs on the {html, MyInfo} line - it appears to be unable to display the value.
> 
> My reading of the docs suggests that the return value of sets:info/2 is a simple value, but I suspect that it is not and have not yet worked out a way of visualising what sort of structure is being returned by the function.
> 
> Cheers.
> _______________________________________________
> erlang-questions mailing list
> 
> http://erlang.org/mailman/listinfo/erlang-questions




More information about the erlang-questions mailing list