guile-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: defining new character names?


From: Lynn Winebarger
Subject: Re: defining new character names?
Date: Wed, 21 Aug 2002 10:24:20 -0500

On Wednesday 21 August 2002 03:12, Lars J. Aas wrote:
> The most "transparent" solution
> would be to allow
> 
>   (define #\paren-close #\051)
> 
> [If the first token looks like a character constant, the second must
> be one too?]  Would that be possible to implement without any overhead
> on the define implementation?  Would it break something?

     Given the raging debate on this, I'll point out that Chez Scheme
has a function char-name that does this job.  
(char-name #\space) => 'space
(char-name 'space) => #\space
(char-name 'sym) => #f
(char-name #\b) => #f

(char-name 'paren-close #\051) => unspecified
(char-name #\paren-close) => 'paren-close

    Seems like a pretty good solution to me.
    
Lynn




reply via email to

[Prev in Thread] Current Thread [Next in Thread]