Re: Re: NumberPadding on the left

• To: mathgroup at smc.vnet.net
• Subject: [mg82906] Re: [mg82902] Re: NumberPadding on the left
• From: Carl Woll <carlw at wolfram.com>
• Date: Sat, 3 Nov 2007 03:21:24 -0500 (EST)
• References: <fg9pq4\$n29\$1@smc.vnet.net><fgc9qk\$90c\$1@smc.vnet.net> <200711021005.FAA20065@smc.vnet.net>

```zac wrote:

>Thanks for pointing that out.
>Based on this information, I've written a simple function to simulate
>the behaviour I wanted to achieve:
>
>In[19]:=
>Needs["Utilities`FilterOptions`"];
>
>DigitForm::usage="DigitForm[expr, {l,
>r}] prints expression with exactly r numerical digits on the right
>(rounding \
>fractional part) and exactly l (or more, if needed) numerical digits
>on the \
>left side of the decimal point.";
>
>DigitForm[num_,{l_,r_},opts___?
>{opts}/.Options[DigitForm];
>      left=If[l==="Default",1,l];
>[Rule]{\
>If[Negative[num],"-",""],
>
>
>DigitForm[#,{3,2}]&/@{.001,.1,1,11,-11,111,-111,Rational[8,10]}
>
>
>Out[23]=
>{000.00,000.10,001.00,011.00,-011.00,111.00,-111.00,000.80}
>
>which prints exactly those numbers I need.
>
>If anyone could come up with a more simple function, please let me
>know that!
>
>Istvan
>
>
>
Why don't you use:

NumberSigns->{"-"," "}

or

NumberSigns->{"-","\[InvisibleSpace]"}