I'm attempting to use a record in a guard as described here[1]. If I use the short form described there:
handle(Msg, State) when Msg==#msg{to=void, no=3} ->
... I never get a match... however, if I fully expand it to:
handle(Msg, State) when Msg#msg.to==void, Msg#msg.no==3 ->
... all is well. As it seems I do with most erlang docs, am I reading it wrong?
Thanks, --tim
[1] - http://www1.erlang.org/doc/reference_manual/records.html#id2278275