Shiro Kawai scripsit:
> (1) Define char-numeric? returns #t if the character's Numeric_Type
> property value is other than 'None'.
AFAICT no Scheme supports this definition.
> (2) Drop char-numeric?, and add char-numeric-type and
> char-numeric-value. The former returns the value of Numeric_Type
> property, and the latter returns the value of Numeric_Value property.
> This should be the way to provide access to a character's Unicode
> "Numeric" property.
Dropping an IEEE Scheme procedure is out of scope.
> (3) Define char-numeric? to return #t only for 0,1,2,3,4,5,6,7,8 and
> 9. This retains the compatibility to R5RS, and we can still use
> char-numeric? to parse numbers, and safely use (- (char->integer
> c) (char->integer #\0)) to obtain the digit value the character
> represents. (Note: R5RS programs that use char-numeric? to parse
> numbers will break if we adopt the current draft's definition of
> char-numeric?).
Gauche, Gambit, and Chicken (without the utf8 egg) work like this.
(4) Define char-numeric? to return #t for decimal digits only (general
category value of Nd). Guile 2.0, Kawa, Larceny, Ypsilon, Mosh, and
IronScheme work like this.
(5) define char-numeric? as equivalent to the Number property (general
category value of Nd, Nl, No). Scheme48, Chez, and Ikarus work like
this.
--
He played King Lear as though John Cowan <cowan@ccil.org>
someone had played the ace. http://www.ccil.org/~cowan
--Eugene Field
_______________________________________________
Scheme-reports mailing list
Scheme-reports@scheme-reports.org
http://lists.scheme-reports.org/cgi-bin/mailman/listinfo/scheme-reports