Practical Common Lisp

You have problems, and we're glad to hear them. Explain the problem, what you have tried, and where you got stuck.
Feel free to share a little info on yourself and the course.
Forum rules
Please respect your teacher's guidelines. Homework is a learning tool. If we just post answers, we aren't actually helping. When you post questions, be sure to show what you have tried or what you don't understand.

Practical Common Lisp

Postby milkybar_ton » Sun Mar 16, 2014 12:32 pm

Hi folks,
Had a false start a few months ago with my outdated Lisp-in-a-box on a mac but picked up a cheap as chips Thinkpad and thanks to a very helpul fellow on youTube got emacs,SBCL,Slime installed ok.

Working slowly through the above mentioned book and i'm already stuck on page 23

CL-USER> (defun prompt-read (prompt)
(format *query-io* "~a: " prompt)
(force-output *query-io*)
(read-line *query-io))
; caught WARNING:
; undefined variable: *QUERY-IO
; compilation unit finished
; Undefined variable:
; caught 1 WARNING condition

What does this all mean? it does return PROMPT-READ after all ?

Thanks in advance
Posts: 6
Joined: Wed Jul 03, 2013 2:30 pm

Re: Practical Common Lisp

Postby Goheeca » Sun Mar 16, 2014 12:52 pm

*query-io* is global variable. The asterisks are part of the variable name, they are just like any other characters. There is missing one in the last line of source code.
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.
User avatar
Posts: 271
Joined: Thu May 10, 2012 12:54 pm

Return to Homework

Who is online

Users browsing this forum: No registered users and 1 guest