Subject: Re: question about symbol->string, string->list
From: rpw3@rigden.engr.sgi.com (Rob Warnock)
Date: 2000/07/14
Newsgroups: comp.lang.scheme
Message-ID: <8kms0b$55ooc$1@fido.engr.sgi.com>
Cat <ny_baby@excite.com> wrote:
+---------------
| oh sorry, I am trying to write an infix parser that takes in a list of
| inputs.  So, it can include numbers and operators and in the end variables.
| But if you enter 3+2 scheme recognizes it as a symbol so...
+---------------

Why not just read the input character-at-a-time with "read-char"?
Or if your Scheme has "read-line" (and your inputs are guaranteed
to be less than one line):

    > (begin (read-char) ; throw away the NL at the end of this sexpr
	     (string->list (read-line)))
    Hello 5*(3+4)-2
    (#\H #\e #\l #\l #\o #\space #\5 #\* #\( #\3 #\+ #\4 #\) #\- #\2 #\space)
    > 


-Rob

-----
Rob Warnock, 41L-955		rpw3@sgi.com
Applied Networking		http://reality.sgi.com/rpw3/
Silicon Graphics, Inc.		Phone: 650-933-1673
1600 Amphitheatre Pkwy.		PP-ASEL-IA
Mountain View, CA  94043