On 25 Apr 2005 15:25:26 +0200, Nicolas Pelletier <[EMAIL PROTECTED]> wrote: > Hello, > > I would like to represent "the symbol .". This works fine: > > #;1> (list 'a (string->symbol ".") 'b) > (a |.| b) > > But this does not: > > #;2> (list 'a '|.| 'b) > Error: invalid use of '.' > #;2> b > #;3> (a)
The above expression would be read in as (list (quote a) (quote .) (quote b)) which is invalid syntax. The second item is still treated as an (invalid) dotted pair. > > I expected the same behaviour as with "the symbol )": > > #;4> (list 'a (string->symbol ")") 'b) > (a |\)| b) > #;5> (list 'a '|\)| 'b) > (a |\)| b) Here the reader specifically scans the input stream for a list terminator, and so the quoted paren is not recognized as the delimiter. > > Is there a way to input the dot as a symbol literal ? > Hm, in fact I can't think of a decent solution right now. It certainly is somewhat inconsistent. Perhaps I can find a way around this. cheers, felix _______________________________________________ Chicken-users mailing list [email protected] http://lists.nongnu.org/mailman/listinfo/chicken-users
