bug-apl
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug-apl] format by example and comma


From: David B. Lamkins
Subject: [Bug-apl] format by example and comma
Date: Sat, 05 Jul 2014 20:48:17 -0700

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

[Prev in Thread] Current Thread [Next in Thread]