Fix monetary floating-point formatted output

(Scott Burson)

The ~$ format directive had the following:

ABCL> (format nil "~$" -2.34)

c.f. <>
parent 3595cae1
...@@ -2398,7 +2398,7 @@ ...@@ -2398,7 +2398,7 @@
(let* ((signstr (if (minusp number) "-" (if atsign "+" ""))) (let* ((signstr (if (minusp number) "-" (if atsign "+" "")))
(signlen (length signstr))) (signlen (length signstr)))
(multiple-value-bind (str strlen ig2 ig3 pointplace) (multiple-value-bind (str strlen ig2 ig3 pointplace)
(sys::flonum-to-string number nil d nil) (sys::flonum-to-string (abs number) nil d nil)
(declare (ignore ig2 ig3 strlen)) (declare (ignore ig2 ig3 strlen))
(when colon (when colon
(write-string signstr stream)) (write-string signstr stream))
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment