Thanks, I understand it now. Racket is not Scheme but if I were to strictly follow the R6RS, then both should fail, since both characters and booleans require delimiters. <br><br><div class="gmail_quote">On Tue, Feb 1, 2011 at 9:35 AM, Matthew Flatt <span dir="ltr"><<a href="mailto:mflatt@cs.utah.edu">mflatt@cs.utah.edu</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">Different Scheme variants vary in whether `#t' and `#f' must be<br>
followed by a delimiter. R6RS, for example, requires a delimiter.<br>
<br>
Prior to version 5.0.2, Racket did not require a delimiter, but now it<br>
does (while `#true' and `#false' are also allowed as booleans).<br>
<div><div></div><div class="h5"><br>
At Tue, 1 Feb 2011 08:59:04 -0600, qld3303 wrote:<br>
> Hello,<br>
> I'm a beginner trying to write a simple Scheme interpreter to help<br>
> understand Racket better. I try to mimic the results from the repl as best<br>
> possible however in some cases I'm not sure how to reproduce them, this<br>
> being one such case. It seems to imply that an identifier or something<br>
> other than a boolean could begin with #t but I'm not sure. I tried this<br>
> using Guile and got the opposite results:<br>
> guile> (+ 3 1)#t+<br>
> 4<br>
> #t<br>
> #<primitive-generic +><br>
> guile> (+ 3 1)#\t+<br>
> 4<br>
> ERROR: In procedure scm_lreadr:<br>
> ERROR: #<unknown port>:2:1: unknown character name t+<br>
> ABORT: (read-error)<br>
><br>
> Currently, my naive repl will work for both characters and booleans but<br>
> perhaps it shouldn't?<br>
><br>
> Thanks<br>
><br>
> On Mon, Jan 31, 2011 at 9:13 PM, qld3303 <<a href="mailto:qld3303@gmail.com">qld3303@gmail.com</a>> wrote:<br>
><br>
> > I'm not clear as to why the following occurs:<br>
> ><br>
> > > (+ 3 1)#t+<br>
> > 4<br>
> > readline-input::183: read: bad syntax `#t+'<br>
> ><br>
> > > (+ 3 1)#\t+<br>
> > 4<br>
> > #\t<br>
> > #<procedure:+><br>
> ><br>
> > Why doesn't it recognize that #t is a boolean value?<br>
> ><br>
</div></div><div><div></div><div class="h5">> _________________________________________________<br>
> For list-related administrative tasks:<br>
> <a href="http://lists.racket-lang.org/listinfo/users" target="_blank">http://lists.racket-lang.org/listinfo/users</a><br>
</div></div></blockquote></div><br>