[erlang-questions] Binaries
Pierre Fenoll
pierrefenoll@REDACTED
Tue Jun 19 17:38:41 CEST 2018
The integer-unit bit syntax should help you.
http://erlang.org/doc/programming_examples/bit_syntax.html#segments
Cheers,
--
Pierre Fenoll
On Tue, 19 Jun 2018 at 17:33, Bob Cowdery <bob@REDACTED> wrote:
> If I have a number, say 1450000001 and I want to represent that as a
> binary in the form
>
> <<16#14,16#50,16#00,16#00,16#01>> what's the best way.
>
> I'm not sure what list_to_binary(integer_to_list(1450000001)) which
> prints as <<"1450000001">> produces but I guess its 10 bytes not 5.
>
> BobC
>
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://erlang.org/mailman/listinfo/erlang-questions
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20180619/a9b1a2c9/attachment.htm>
More information about the erlang-questions
mailing list