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

more editorial comment on format

    Date: Wednesday, 9 July 1986  16:39-EDT
    To:   common-lisp at SU-AI.ARPA
    Re:   more editorial comment on format

    Personally, I think that if you need to use
    more than ~a, ~s, ~%, ~t, and ~~, you should be writing Lisp code to
    do the formatting instead of using this crufty embedded language that
    bears no resemblance or relationship to the rest of Common Lisp.

I heartily agree!  Being a relative novice at using FORMAT (except in
the most straightforward way), I've spent far too much time trying to
get format control strings to do what I want.  This seems like a case
of the solution being harder than the problem...

    It's also unfortunate that there aren't *functions* provided to do some
    of the nastier numeric formatting, like ~e and friends.

Well, you can always:

   (defun exp-floating-point (w d e k overflow-char padchar expchar)
     (format nil "~v,v,v,v,v,v,vE" w d e k overflow-char padchar

... :-)