Subject: Re: Scheme Compilers???
From: (Rob Warnock)
Date: 25 Jul 2002 07:14:23 GMT
Newsgroups: comp.lang.scheme
Message-ID: <aho8gf$bbul6$>
Siegfried Gonzi  <> wrote:
| In CommonLisp I never grasped how to pass values in the console
| (the program should ask me to type in a number for example);
| this is or was utterly complicated...

Hunh? What's so complicated about it?

	> (defun prompt-for-number-and-read ()
	    (format *query-io* "~%Type a number: ")
	    (read *query-io*))
	> (let ((x (prompt-for-number-and-read)))
	    (format t "The number you typed was '~D'~%" x)
	Type a number: 37
	The number you typed was '37'

From CLHS "21.1.2 Stream Variables", thence "*query-io*":

	The value of *QUERY-IO*, called "query I/O", is a bidirectional
	stream to be used when asking questions of the user. The question
	should be output to this stream, and the answer read from it.


Rob Warnock, 30-3-510		<>
SGI Network Engineering		<>
1600 Amphitheatre Pkwy.		Phone: 650-933-1673
Mountain View, CA  94043	PP-ASEL-IA

[Note: and aren't for humans ]