From: Vitaly M. <v.m...@gm...> - 2009-06-01 09:25:05
|
At Sun, 31 May 2009 22:25:14 +0200, Vitaly Mayatskikh wrote: > > Hello! > > (format nil "~5,2F" 0.001) prints "0.001" where it should be " 0.01" Typo: should be " 0.00". > diff --git a/src/code/print.lisp b/src/code/print.lisp > index 9e302d9..490d86d 100644 > --- a/src/code/print.lisp > +++ b/src/code/print.lisp > @@ -1324,7 +1324,8 @@ > (write-string "." stream) > (dotimes (i (- e)) > (write-char #\0 stream)) > - (write-string string stream) > + (write-string string stream :start (min (length > + string) (- e))) > (when fdigits > (dotimes (i (+ fdigits e (- (length string)))) > (write-char #\0 stream))))) > > -- > wbr, Vitaly -- wbr, Vitaly |