New format/fwrite options
Fri Apr 12 00:03:16 CEST 2002
On Thu, 11 Apr 2002, Robert Virding wrote:
> Eshell V2001.09.13 (abort with ^G)
> 1> io:fwrite("~#~n", ). %Default is 8
Great. I agree that 8 is a good default.
> 6> io:fwrite("~b~n", ). %Default is 32 bits
> 7> io:fwrite("~b~n", [-4711]).
> I think you get the idea. The only real question I think is if it
> should be the precision field which gives the number of relevant
> bits in ~b/x or the field width. It might be bit of an overkill to
> have both field width and "precision". Comments?
Definitely the precision. Field width is a parameter of, well, the field
size (duh), while precision is the "rendering" parameter.
Richard Carlsson (richardc@REDACTED) (This space intentionally left blank.)
E-mail: Richard.Carlsson@REDACTED WWW: http://www.csd.uu.se/~richardc/
"Having users is like optimization: the wise course is to delay it."
-- Paul Graham
More information about the erlang-questions