<div dir="ltr">hi, all.<br>when I read this paper: Programming Efficiently with Binaries and Bit Strings <a href="http://www.erlang.se/euc/07/papers/1700Gustafsson.pdf">http://www.erlang.se/euc/07/papers/1700Gustafsson.pdf</a>, I encounter a compile error, the code snipes is a example to parse the IS 683-PRL protocol:<br>
<br>decode(<<N:5,Chans:N/bits-unit:11,_/bits>>) -><br> [Chan || <<Chan:11>> <- Chans].<br><br>the compiler says:<br> bit type mismatch (unit) between 11 and 1<br><br>I read the erlang reference mannual, the bits unit default is 1, I think the unit can be set, why this compile error occur? thank you!<br>
my erlang emulator is 5.6.3(R12B-3).<br></div>