small medium large xlarge

19 Apr 2014, 15:03
Geoffrey Clements (22 posts)

I think there is an error in the description of pattern matching binaries. The section Binaries and Pattern Matching seems to say that all types are treated as bitstrings. The binary type seems to be different. It is expecting the size in bytes, rather than bits. I have a pattern like:

<< _::size(extlen), key::[binary, size(keylen)], data::binary >> = tail

extlen is bits, but keylen is bytes, not bits.

You must be logged in to comment