[erlang-questions] pattern matching with records in a function
Attila Rajmund Nohl
attila.r.nohl@REDACTED
Tue Apr 10 12:23:48 CEST 2012
2012/4/10 Pablo Vieytes <pablo.vb80@REDACTED>:
> Hi,
> I'm trying to use records in functions pattern matching but I'm not able. I
> want something like that:
>
> handle_cast(Msg = #inputmsg{_='_'}, State) ->
> do_something(Msg),
> {noreply, State};
>
> Any idea?
One idea:
handle_cast( #inputmsg{} = Msg, State) ->
do_something(Msg),
{noreply, State};
Although I'm not quite sure what you want to achieve...
> thanks.
>
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://erlang.org/mailman/listinfo/erlang-questions
>
More information about the erlang-questions
mailing list