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

FORMAT losing



In Maclisp 2122, Format 827. on MIT-MC: 

Ignoring the rough points in what these actually ask FORMAT to do ('cuz
there are a few conceptual bugs), these functions do not behave in ways
even remotely resembling what the LispM does with them. For example, the
LispM does not err, pdl-overflow, or complain of missing ~]'s. Simple 
tests like (f nil), (f '(a)), (f '(a b)), (f '(a b c)) and likewise for g
should give you a feel for what I'm talking about. G'luck.

(defun f (x)
 (lexpr-funcall #'format t "~#[nothing~;~S~;~S and ~S~
             ~:;~@{~<~% ~1,50:;~#[~1; and~] ~S~>~^,~}~]" x))

(defun g (x)
  (format t "~%;; ~{~<~%;; ~1,50:;~#[~1; and~] ~S~>~^,~}.~%" x))

-kmp