MathGroup Archive 2009

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: NumberForm spaces and commas in v7.0.1

  • To: mathgroup at smc.vnet.net
  • Subject: [mg98867] Re: NumberForm spaces and commas in v7.0.1
  • From: Albert Retey <awnl at gmx-topmail.de>
  • Date: Mon, 20 Apr 2009 19:10:51 -0400 (EDT)
  • References: <gshfup$c2g$1@smc.vnet.net>

underante wrote:
> hello,
> 
> in Mathematica v4 and 5.2 to print long numbers separated by commas in blocks
> of 3, i used to use something like this for example:
> 
> NumberForm[N[Pi, 10], DigitBlock -> 3]
> 
> which gave:
> 
> 3.141,592,654
> 
> i.e. commas to the right of the decimal point. but in Mathematica v7.0.1  the
> same statement generates number blocks separated by spaces, i.e:
> 
> 3.141 592 654
> 
> i can recover the commas by using something like:
> 
> NumberForm[N[Pi, 10], DigitBlock -> 3, NumberSeparator -> ","]
> 
> but does anyone know if there is a quick fix to get the old style
> commas back without having to change all my old programs in this way?

This will do it globally (for the current session), so that it will
affect all other functionality, too. So you need to decide whether it is
what you want or not:

SetOptions[NumberForm, NumberSeparator -> ","]

if you put that line in your init.m it will be changed in all your
sessions...

hth,

albert


  • Prev by Date: Re: integrate problem
  • Next by Date: Re: NumberForm spaces and commas in v7.0.1
  • Previous by thread: Re: NumberForm spaces and commas in v7.0.1
  • Next by thread: Re: NumberForm spaces and commas in v7.0.1