-
assigned issue to
Implement 'char->integer' and 'integer->char' in Scheme
Issue #43
resolved
char->integer returns the Unicode scalar value of char as an exact integer.
integer->char returns the character corresponding to the Unicode scalar value n.
http://www.scheme.com/tspl4/objects.html#./objects:s210
These examples should return 10 and #\0 respectively.
(char->integer #\newline)
Traceback (most recent call last):
File "stdin", line 1, col 2
RunTimeError: unbound variable 'char->integer'
(integer->char 48)
Traceback (most recent call last):
File "stdin", line 1, col 2
RunTimeError: unbound variable 'integer->char'
Comments (2)
-
-
- changed status to resolved
The commit d17d363 resolves this issue. More importantly, I've used this as an example of how to add simple functions to Scheme. The details are here: http://calicoproject.org/CalicoScheme#Adding_Primitives
- Log in to comment