Re: [Scheme-reports] digit-value
John Cowan 01 Jul 2012 07:15 UTC
Marc Feeley scripsit:
> What is the rationale for digit-value ? Its usefullness seems limited.
> It could be used to parse decimal numbers and convert them to their
> numerical value. However, a more general procedure would be useful
> to parse numbers in any base:
Its purpose is to determine for any digit character (not merely the
European digits 0-9) what its numeric value is. For example,
(digit-value #\x0663) => 3, because ٣ U+0663 is the Arabic-Indic digit 3.
Of course, if the implementation does not support this character, that
won't work.
--
John Cowan cowan@ccil.org http://www.ccil.org/~cowan
C'est la` pourtant que se livre le sens du dire, de ce que, s'y conjuguant
le nyania qui bruit des sexes en compagnie, il supplee a ce qu'entre eux,
de rapport nyait pas. --Jacques Lacan, "L'Etourdit"
_______________________________________________
Scheme-reports mailing list
Scheme-reports@scheme-reports.org
http://lists.scheme-reports.org/cgi-bin/mailman/listinfo/scheme-reports