Skip to content
Snippets Groups Projects
Commit e91dc189 authored by pw's avatar pw
Browse files

From Eric Marsden:

    Problem: (format t "~f" "foo") => Error "Argument y is not a real:
    nil". CLHS says "If arg is a complex number or some non-numeric
    object, then it is printed using the format directive ~wD, thereby
    printing it in decimal radix and a minimum field width of w".
parent 8de4d134
No related branches found
No related tags found
No related merge requests found
......@@ -5,7 +5,7 @@
;;; Carnegie Mellon University, and has been placed in the public domain.
;;;
(ext:file-comment
"$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/format.lisp,v 1.41 1999/04/12 12:39:26 dtc Exp $")
"$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/format.lisp,v 1.42 2001/06/17 19:10:25 pw Exp $")
;;;
;;; **********************************************************************
;;;
......@@ -602,10 +602,11 @@
(write-string string stream))
(dotimes (i minpad)
(write-char padchar stream))
(do ((chars (+ (length string) minpad) (+ chars colinc)))
((>= chars mincol))
(dotimes (i colinc)
(write-char padchar stream)))
(and mincol minpad colinc
(do ((chars (+ (length string) minpad) (+ chars colinc)))
((>= chars mincol))
(dotimes (i colinc)
(write-char padchar stream))))
(when padleft
(write-string string stream)))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment