Consider this (rather artificial) snippet:
(defmacro add-crlf (string)
(write-string string o)
(princ #\Return o)
(princ #\LineFeed o)
(print (length (add-crlf "a")))
It prints 3 when loaded without or with compiling, but
2 when compile-file is used and .fas loaded.
I think it is due to treatment described in impnotes
13.8., Treatment of Newline during Input and Output.
I believe this contradicts requirements of CLHS about
similarity of compile-file/loaded literals:
"The file compiler must cooperate with the loader in
order to assure that in each case where an
externalizable object is processed as a literal object,
the loader will construct a similar object." (188.8.131.52)
Log in to post a comment.