[erlang-questions] Has anyone actually run the final example messenger in "Getting Started with Erlang" ? Some weird problem

lang qiu <>
Sun Feb 15 17:00:53 CET 2009


Hi,

Has anyone actually run the final example in "Getting started with Erlang",
that messenger example with macro and record ?
I hit some weird problem. So I can log in to the server successfully but
whenever sending a message to other (including myself), the erlang shell
always return "*receiver_not_found*" error.

I print the User_List and find something weird. So User_List is constructed
as [{From, Name} | User_List], but when print it (using ~p), User_list looks
like  User list = [{<5241.36.0>,*[qiu]*},{<5164.36.0>,*[tom]*}] instead of
User list = [{<5241.36.0>,*qiu*},{<5164.36.0>,*tom*}]. I am not sure it is
the print issue or the element of User_List does become { From, [Name] }
instead of { From, Name }.

I guess this is the reason why *lists:keysearch*(To, 2, User_List) does not
find the login user.

So has anyone ever hit this problem ?

Thanks!

BTW I run it on Windows XP.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20090216/c3176911/attachment.html>


More information about the erlang-questions mailing list