[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: arithmetic issues

John.Cowan wrote:
Alan Watson scripsit:

At least one Scheme (Kawa) has a read syntax for the EOF object.

So does Chicken, namely the token #!eof.  And sure enough, if you type
that into the REPL, the Chicken interpreter terminates.

In Kawa (I don't know about Chicken) it a bit more subtle:
If the interpreter reads a #!eof, then it stops.  However,
a #!eof nested inside a list, say, does not terminate the
interpreter.  Thus you can write:
or even:
(let ((r (read))) (if (eq? r #!eof) "saw eof!"))
	--Per Bothner
per@xxxxxxxxxxx   http://per.bothner.com/