New format/fwrite options

Robert Virding robert.virding@REDACTED
Wed Mar 27 09:25:43 CET 2002

By popular (:-) request I am adding two new options to format/fwrite for outputing integers
in binary and hex, ~b and ~x. There is a small problem though with negative numbers.
For how long do you extend the representation with '1'? Seeing we have bignums there
is no concept of a word size.

One suggestion is to extend in blocks of 32 bits until we have enough digits
to show that it is a negative. If you explicitly give a precision then that will be
used. This seems a bit hacky, why 32 and not 8 or 16?

Any better suggestions?


More information about the erlang-questions mailing list