WITH-STANDARD-IO-SYNTAX in the gcl

Discussion of Common Lisp
Post Reply
Andrey Bushman
Posts: 1
Joined: Fri Mar 21, 2014 12:09 pm
Location: Russia
Contact:

WITH-STANDARD-IO-SYNTAX in the gcl

Post by Andrey Bushman » Sun Mar 23, 2014 1:03 pm

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?

Goheeca
Posts: 271
Joined: Thu May 10, 2012 12:54 pm
Contact:

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

Post by Goheeca » Mon Mar 24, 2014 4:41 pm

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.
cl-2dsyntax is my attempt to create a Python-like reader. My mirror of CLHS (and the dark themed version). Temporary mirrors of aferomentioned: CLHS and a dark version.

Post Reply