creating a binary number

Java House java4dev@REDACTED
Thu Dec 9 17:04:40 CET 2021


Hello

I am trying to build a binary number but I cannot find the correct way:
13> <<1:1/bitstring,
0:1/bitstring,0:1/bitstring,0:1/bitstring,0:1/bitstring,0:1/bitstring,0:1/bitstring,0:1/bitstring>>.
** exception error: bad argument
     in function  eval_bits:eval_exp_field1/6 (eval_bits.erl, line 123)
     in call from eval_bits:create_binary/2 (eval_bits.erl, line 81)
     in call from eval_bits:expr_grp/4 (eval_bits.erl, line 72)

How do we build a binary number e.g.
10000000 or 10101010 or even a binary number that is not just 8 bit but 12,
14 or 17 bit long

Kind Regards
Nikolas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20211209/123dc85d/attachment.htm>


More information about the erlang-questions mailing list