[erlang-questions] Printing very large numbers without e

Richard Andrews bflatmaj7th@REDACTED
Wed Jul 22 08:03:16 CEST 2009


On Wed, Jul 22, 2009 at 12:59 PM, Yves S.
Garret<yoursurrogategod@REDACTED> wrote:
> Hi,
>
>   I'm not sure where to get an answer to this question.  Say I want
> to see an integer printed out, but I don't want the e in the middle of
> my number.
>
> 1> io:format("~w~n", [1000000 / 2]).
> 5.0e5
> ok
>
> How can I get 500000?  I've looked at the documentation and couldn't
> find anything that would give me the whole number without e.  Did I
> miss something?

1> io:format("~B~n", [1000000 div 2]).
500000
ok


More information about the erlang-questions mailing list