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

Re: arithmetic issues

This page is part of the web mail archives of SRFI 77 from before July 7th, 2015. The new archives for SRFI 77 contain all messages, not just those from before July 7th, 2015.



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:
'#eof
or even:
(let ((r (read))) (if (eq? r #!eof) "saw eof!"))
--
	--Per Bothner
per@xxxxxxxxxxx   http://per.bothner.com/