For Programmers: Free Programming Magazines  


Home > Archive > Scheme > February 2005 > R5RS Legal Characters with #\









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author R5RS Legal Characters with #\
drcode@gmail.com

2005-02-05, 3:58 am

I was reading the R5RS and was looking for a description of what
characters are supported after the #\ reader macro- For instance, is

#\~

considered a legal R5RS character? Is there a comprehensive list?

I couldn't find any definitive description on this issue in R5RS or
elsewhere- Google wasn't much help to me on this either.

I'm sure this must be a pretty "FAQish" item already for this
newsgroup, although I had trouble finding any good older threads for
this- Anyone have any pointers where I can find this info? Thanks!

Conrad Barski, M.D.

Ray Dillinger

2005-02-05, 8:58 am

drcode@gmail.com wrote:
> I was reading the R5RS and was looking for a description of what
> characters are supported after the #\ reader macro- For instance, is
>
> #\~
>
> considered a legal R5RS character? Is there a comprehensive list?


Yep.

In fact it's legal to use it within symbols as though it were
an alphabetic letter.

> I couldn't find any definitive description on this issue in R5RS or
> elsewhere- Google wasn't much help to me on this either.


Well, the character is mentioned specifically in section 7.1.1 in
the section on identifiers, so it must exist in an R5RS scheme.

And it's mentioned specifically that a character constant is hash
and backslash followed by "any character". If there'd been a reason
to leave ~ out, I'm sure it would have mentioned an exception. Note
that even the "named" characters of the portable set -- space and
newline -- can also be written as literal character constants.

Some characters, however, such as backspace, are open to more
interpretation; it's not required for a scheme system to have
a backspace character, so it's open to question how or whether
a constant of that value should be written.

Bear

Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com