[erlang-questions] io:format problem within a process, but not in the shell
Nicolas Charpentier
nc@REDACTED
Tue Dec 16 17:24:24 CET 2008
Hi,
With the few information you gave I might have some suppositions:
1)- the Set might not be a set when your process receive the message repr.
2)- Your erlang WM might be stopped *before* all io events be treated.
Regards,
Eric Holbrook wrote:
> Why doesn't *all* of my io:format code work w/in the context of my
> process?
>
>
> <code>
>
> setMgr( Set ) ->
> receive
> {repr} ->
> io:format("Set elements: ~n"),
> [io:format(" ~p~n", [Elem]) || Elem <- sets:to_list(Set)],
> setMgr(Set);
> {other various blocks to add/modify my internal set 'Set'} ->
> ...
> end.
>
> </code>
>
> When i send the {repr} msg to a 'setMgr' process, i get the 'Set
> elements' output, but somehow the list comprehension part doesn't show
> up in STDOUT.
>
> However, if i create a set named Set in the shell, and execute the
> list comprehension line, it works fine.
>
> tia,
> Eric
----
Nicolas Charpentier
http://charpi.net
More information about the erlang-questions
mailing list