[erlang-questions] binary elements greater than 255

Igor Ribeiro Sucupira igorrs@REDACTED
Sat Apr 26 01:11:06 CEST 2008


No.
If you use integers in a binary, each must be in the range [0, 255] (1-byte).

Igor.

On Fri, Apr 25, 2008 at 7:44 PM, Zvi <exta7@REDACTED> wrote:
>
>  Is this a bug?
>  Zvi
>  ------------------------------------------------------------
>  Erlang (BEAM) emulator version 5.6 [smp:2] [async-threads:0]
>
>  Eshell V5.6  (abort with ^G)
>  1>
>  1> <<0,255>>.
>  <<0,255>>
>  2> <<0,256>>.
>  <<0,0>>
>  3> <<0,257>>.
>  <<0,1>>
>  4> <<0,65536>>.
>  <<0,0>>
>  5> <<0,1111111111>>.
>  <<0,199>>
>  6>
>  --
>  View this message in context: http://www.nabble.com/binary-elements-greater-than-255-tp16906944p16906944.html
>  Sent from the Erlang Questions mailing list archive at Nabble.com.



More information about the erlang-questions mailing list