[erlang-questions] sub-byte endianness in bit syntax

Tony Finch dot@REDACTED
Thu Aug 16 19:54:03 CEST 2007


On Wed, 15 Aug 2007, Bob Ippolito wrote:

> It takes a few seconds to figure this out yourself:
>
> 1> <<A:2/little, B:2/big, _:4>> = <<2#10100000>>, {A, B}.
> {2,2}

It would be nice if this were documented.

How do you tell Erlang to fill bytes little-end first?

Tony.
-- 
f.a.n.finch  <dot@REDACTED>  http://dotat.at/
IRISH SEA: SOUTHERLY, BACKING NORTHEASTERLY FOR A TIME, 3 OR 4. SLIGHT OR
MODERATE. SHOWERS. MODERATE OR GOOD, OCCASIONALLY POOR.



More information about the erlang-questions mailing list