Matching binaries in list comprehensions

Mark Scandariato <>
Wed Jun 30 23:28:05 CEST 2004


Given a list of binaries in Recs, I have the following list comprehension:

Msgs = (catch [{Type, Value} || <<Type:16, _Len:16, Value:_Len/binary>> 
<- Recs])

The compiler complains:
Warning: variable '_Len' shadowed in generate

But the code works fine. _Len appears nowhere else in the function.

What's the warning mean?

Thanks,
Mark.




More information about the erlang-questions mailing list