Subject: Re: Beyond CL?
From: rpw3@rpw3.org (Rob Warnock)
Date: Sun, 21 Aug 2005 22:18:11 -0500
Newsgroups: comp.lang.lisp
Message-ID: <14qdnR9y_p9u3pTeRVn-rg@speakeasy.net>
Ray Dillinger  <bear@sonic.net> wrote:
+---------------
| Rob Warnock wrote:
| > Another plus is that CHAR-CODE-LIMIT, the "upper exclusive bound on
| > the value returned by the function char-code", is an non-negative
| > INTEGER, not a FIXNUM, so while the occasional BIGNUM is ugly, it's
| > not forbidden.
| 
| But you can't pick a finite value for char-code-limit with grapheme
| characters...
+---------------

Just pick something "really big", big enough to encode enough
overstrikes to turn the whole grapheme solid black, e.g., maybe
whatever CHAR-CODE-LIMIT value could accommodate a character
composed of a 256 codepoint sequence, say.

+---------------
| ...and there will be a bunch of integers between 0 and
| char-code-limit that don't correspond to any legitimate character.
+---------------

No problemo, says the CLHS:

    Function CODE-CHAR
    code-char code => char-p
    ...
    Returns a character with the code attribute given by code.
    If no such character exists and one cannot be created,
    NIL is returned.

And likewise:

    Constant Variable CHAR-CODE-LIMIT
    ...
    The value of char-code-limit might be larger than the actual
    number of characters supported by the implementation.


-Rob

-----
Rob Warnock			<rpw3@rpw3.org>
627 26th Avenue			<URL:http://rpw3.org/>
San Mateo, CA 94403		(650)572-2607