WITH-STANDARD-IO-SYNTAX in the gcl

Discussion of Common Lisp

WITH-STANDARD-IO-SYNTAX in the gcl

Postby 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?
Andrey Bushman
 
Posts: 1
Joined: Fri Mar 21, 2014 12:09 pm
Location: Russia

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

Postby 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).
User avatar
Goheeca
 
Posts: 213
Joined: Thu May 10, 2012 12:54 pm


Return to Common Lisp

Who is online

Users browsing this forum: No registered users and 4 guests

cron