default floating point printing format

Serge Aleynikov serge@REDACTED
Fri Oct 10 03:55:43 CEST 2003


Hi all!

Does anybody know if there is a way to specify a default format mask for 
outputing floating point numbers in a nested Erlang term.

I.e., given:

Term = [[(2/3), (5/7)], {1.2345, (13/15)}].

I'd like to do:

io:format("~p", [Term])

such that all floating point numbers were printed like: "~.3f"

Thanks.

Serge




More information about the erlang-questions mailing list