[erlang-questions] ei: decoding negative values

Daniel Goertzen <>
Mon Nov 1 15:08:42 CET 2010


See ei_s_print_term() to directly render the number to text, then you don't
have to worry about the sign.

Alternatively, try a larger signed decode like ei_decode_longlong() or
ei_decode_bignum().

Cheers,
Dan.

On Thu, Oct 28, 2010 at 10:13 AM, Joel Reymont <> wrote:

> When using ei, how do I know whether to decode signed or unsigned values?
>
> I'm not sure if I should use ei_decode_long or ei_decode_ulong and
> ei_get_type is not very helpful here.
>
> My goal is to display the value that was encoded.
>
>        Thanks, Joel
>
> ---
> http://twitter.com/wagerlabs
>
>
> ________________________________________________________________
> erlang-questions (at) erlang.org mailing list.
> See http://www.erlang.org/faq.html
> To unsubscribe; mailto:
>
>


-- 
Daniel Goertzen
-----------------
 (work)
 (home)
-----------------
1 204 272 6149 (home/office)
1 204 470 8360 (mobile)
-----------------


More information about the erlang-questions mailing list