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


Oh yeah, and what about using non-defined flags, like so:

(FORMAT NIL "~:%")



I am testing a couple implementations which handle such things differently
(one implementation generaly ignores things which were not defined
specifically in CLtL, the other always signals an error for such things.)


Page 389, CLtL:

as regards ~:@R, what if the arg is zero?  There is no old roman for this.
One implementation just prints 0, the other signals an error!

Another case:  ~:@R again.

Given an argument above 3999, the "forgiving" implementation just prints it as
a decimal integer.  The "unforgiving" implimentation causes an error.

Is this 'cuz the old romans didn't count pas 3999 or somethin'?

The above is also true for ~@R.

Now, for ~:R...

Is there an authoritative source on how one spells the zero ordinance?  Is it
"ZEROTH" or "ZEROETH".  These implementation give different results.

A related subject.

Both these implementations accept the following:

(setq x (make-array 10 :element-type 'string-char :fill-pointer 0))

(format x "test")

X => "test"

I can not find any reference that indicates a string may be used as a stream.
The nearest thing is on page 331, WITH-OUTPUT-TO-STRING.  This appears to
exactly describe the behavior described above (as if the following
transformation had occured)
(with-output-to-string (foo x) (format foo "test"))

However, I don't find anything in FORMAT which says this is expected or
allowed.  Of course, (STREAMP X) => NIL.  

One of these implementations even violates this further, by extending X if it
goes beyond 10 characters.  I can find absolutely nothing to allow this, as it
is not :adjustable.  In fact, every possible justifying reference to allowing
the above FORMAT would still cause an error (or would just ignore) in the case
of over extension.