with-open-file

50 views
Skip to first unread message

tlko...@verizon.net

unread,
Jun 11, 2012, 1:57:08 PM6/11/12
to Land of Lisp
Working through Chapter 12, I execute the example on page 242
(with-open-file (dada "ch12.txt") :direction :output
(print "chapter 12 is in and out" dada))
I get the following error
*** - OPEN: File #P"C:\\Program Files (x86)\\clisp-2.49\\ch12.txt"
does not
exist
And no file is written. Same thing happens if I type the text exactly
as given on page 242 and if I use a path name ("c:\\ch12.txt").

I'm using GNU CLISP 2.49 (2010-07-07) <http://clisp.cons.org/> on
Windows 7, no IDE. Any suggestions?
Thanks
Tom
PS: I am able to read files as also shown on page 242. Also working
chapter 7, I got a similar error message using this command but the
file was written.

Paulo de Souza Geyer

unread,
Jun 11, 2012, 3:21:31 PM6/11/12
to land-o...@googlegroups.com
you wrote: (dada "ch12.txt") :direction :output
it should be: (dada "ch12.txt" :direction :output)

looks like a parenthesis balance problem

tlko...@verizon.net

unread,
Jun 11, 2012, 6:49:16 PM6/11/12
to Land of Lisp
Paulo, dooh! of course, thanks much. Tom

On Jun 11, 3:21 pm, Paulo de Souza Geyer <pauloge...@gmail.com> wrote:
> you wrote: *(dada "ch12.txt") :direction :output*
>
> it should be: *(dada "ch12.txt" :direction :output)*
>
> looks like a parenthesis balance problem
>
> On Mon, Jun 11, 2012 at 2:57 PM, tlkoe...@verizon.net
> <tlkoe...@verizon.net>wrote:
Reply all
Reply to author
Forward
0 new messages