Legal binary syntax?
Mon Dec 30 18:00:21 CET 2002
The two occurrences of Len are not allowed.
You must rewrite code your code as:
<<Len:16/unsigned, Rest/binary>> = Bytes,
<<Id1:16/unsigned, Id2:16/unsigned, Pdu:Len/binary>> = Rest,
erlang> Is this a legal binary syntax:
erlang> <<Len:16/unsigned, Id1:16/unsigned, Id2:16/unsigned, Pdu:Len/binary>> = Bytes,
erlang> where Bytes is a binary.
erlang> I received "Len unbound" error message.
erlang> If assignment is left to right why does this happen ?
erlang> Eduardo Figoli
erlang> INSwitch Solutions
More information about the erlang-questions