I'm trying to use format by example to format a number with commas, and
am confused by the behavior of the comma in the format spec.

I'm using '5,550.05' as the spec. This works fine for numbers having an
integer part up to 99, but from 100 up to 999 I get a spurious leading
comma in the output.

      '5,550.05' ⍕9
    9.0 
      '5,550.05' ⍕99
   99.0 
      '5,550.05' ⍕100
 ,100.0 
      '5,550.05' ⍕999
 ,999.0 
      '5,550.05' ⍕1000
1,000.0 

Is there some other spec that'll give the same output without the
leading comma? Is this a bug?



Reply via email to