[erlang-questions] Bitstring question
Dmitry Kolesnikov
dmkolesnikov@REDACTED
Wed Feb 12 07:32:04 CET 2014
Hello,
Please see comments inline.
Best Regards,
Dmitry >-|-|-(*>
> On 12.2.2014, at 8.27, Mike Oxford <moxford@REDACTED> wrote:
>
> D = <<33:6>>
> <<33:6>>
D is length 6 bit
>
> I want to convert that 6 bit value (33) into a numeric value.
>
> Why does <<0:2, D>> not work?
Type and size is not specified
> Why does <<0:2/bits, D:6/bits>> not work?
Expected size is 8 bits but your bit string is 6
> Why does <<D/integer>> not work?
Integer is 32bit
>
> Thanks in advance!
>
>
>
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://erlang.org/mailman/listinfo/erlang-questions
More information about the erlang-questions
mailing list