home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!cs.utexas.edu!zaphod.mps.ohio-state.edu!caen!umeecs!umn.edu!csus.edu!ucdavis!toadflax!beard
- From: beard@toadflax.cs.ucdavis.edu (Patrick C. Beard)
- Newsgroups: comp.lang.scheme
- Subject: Re: case sensitivity
- Message-ID: <19398@ucdavis.ucdavis.edu>
- Date: 19 Nov 92 07:22:12 GMT
- References: <1992Nov6.062357.8865@Informatik.TU-Muenchen.DE> <9211122110.AA06534@corn-pops>
- Sender: usenet@ucdavis.ucdavis.edu
- Organization: Department of Computer Science, University of California, Davis
- Lines: 40
-
- In article <9211122110.AA06534@corn-pops> Alan@lcs.mit.EDU (Alan Bawden) writes:
-
- > (string->symbol "foo;comment")
- >
- >and
- >
- > (string->symbol "foo")
- >
- >are different.
- >
- >`string->symbol' isn't the reader (the thing that constructs Scheme objects
- >given their printed representations). The thing you are looking for might
- >perhaps be called `string->object', but standard scheme doesn't have it.
- >Perhaps it should.
- >
- > - Alan
-
- Gambit Scheme 1.9 has "string ports." These CAN be used to do exactly
- what you are saying. An example:
-
- Gambit (v1.9)
-
- : (define ip (open-input-string "(a b c) 'XyZ"))
- ip
-
- : (read ip)
- (a b c)
-
- : (read ip)
- 'xyz
-
- : (read ip)
- #[eof]
-
- This does exactly what you want.
-
-
- // Patrick C. Beard
- // Department of Computer Science, U. C. Davis
- // pcbeard@ucdavis.edu
-