Hello, <br>I'm a beginner trying to write a simple Scheme interpreter to help understand Racket better. I try to mimic the results from the repl as best possible however in some cases I'm not sure how to reproduce them, this being one such case. It seems to imply that an identifier or something other than a boolean could begin with #t but I'm not sure. I tried this using Guile and got the opposite results:<br>
<span style="font-family: courier new,monospace;">guile> (+ 3 1)#t+</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">4</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">#t</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">#<primitive-generic +></span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">guile> (+ 3 1)#\t+</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">4</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">ERROR: In procedure scm_lreadr:</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">ERROR: #<unknown port>:2:1: unknown character name t+</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">ABORT: (read-error)</span><br><br>Currently, my naive repl will work for both characters and booleans but perhaps it shouldn't? <br><br>Thanks<br><br><div class="gmail_quote">
On Mon, Jan 31, 2011 at 9:13 PM, qld3303 <span dir="ltr"><<a href="mailto:qld3303@gmail.com">qld3303@gmail.com</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;">
I'm not clear as to why the following occurs:<br><br><span style="font-family: courier new,monospace;">> (+ 3 1)#t+</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">4</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">readline-input::183: read: bad syntax `#t+'</span><br><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">> (+ 3 1)#\t+</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">4</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">#\t</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">#<procedure:+></span><br>
<br>Why doesn't it recognize that #t is a boolean value?<br>
</blockquote></div><br>