Page 1 of 1

WITH-STANDARD-IO-SYNTAX in the gcl

Posted: Sun Mar 23, 2014 1:03 pm
by Andrey Bushman
Linux, gcl.

I read the "Practical Common Lisp" book and try to use its code. I get the problem for the next code (from the book):

Code: Select all

(defun save-db (filename)
 (with-open-file (out filename
                   :direction :output
                   :if-exists :supersede)
    (with-standard-io-syntax
       (print *db* out))))
Result:
>(save-db "www")

Error: The function WITH-STANDARD-IO-SYNTAX is undefined.
Fast links are on: do (si::use-fast-links nil) for debugging
Error signalled by PROGN.
Broken at PROGN. Type :H for Help.
Is the WITH-STANDARD-IO-SYNTAX undefined for the gcl?

Re: WITH-STANDARD-IO-SYNTAX in the gcl

Posted: Mon Mar 24, 2014 4:41 pm
by Goheeca
On their site, they say:
While GCL was originally designed to meet the CLtL1 standard, recent development has brought GCL much of the way toward its current goal -- full ANSI compliance. An ANSI regression test suite is being developed as part of this effort. As of the time of this writing, the new ANSI behavior is enabled optionally at compile time with the configure switch --enable-ansi.
So that's probably the cause.