integer to binary

chandru chandrashekhar.mullaparthi@REDACTED
Fri Oct 7 12:54:29 CEST 2005


On 07/10/05, Sean Hinde <sean.hinde@REDACTED> wrote:
> This thread might help
>
> http://forums.trapexit.org:81/phpBB/viewtopic.php?t=4660
>
> Sean

I did see this thread. All a bit of a bodge :-)

Ideally I'd like to see this support added to the bit syntax. The
runtime system knows the exact size of the integer so it should be
easy enough for it to create a binary of the right size. Failing that,
a size/1 BIF to give the size of an integer.


> On 7 Oct 2005, at 10:57, chandru wrote:
>
> > Hi,
> >
> > I want to convert an integer to a binary without having to
> > guess/figure-out how many bytes are required to fit that integer.
> > There doesn't seem to be a way to do this with the bit syntax.
> >



More information about the erlang-questions mailing list