more embarrasing than reinventing the wheel? Today I found out that I had written functions to convert from character to ascii code and vice versa, as well as test a character's printability, while they were in my standard library all along. The only thing that makes me feel better is that I looked before writing them and simply failed to find the library functions, rather than re-inventing the wheel without thinking.
Name:
Anonymous2007-10-26 3:52
>>1 from character to ascii code
If it doesn't support all of Unicode, it's already obsolete.
as well as test a character's printability
There's so much more information and semantics you can access to for any character if you use the proper character sets and standards.
Name:
Anonymous2007-10-26 3:55
>>2
Don't worry it does support Unicode (mine didn't).
More information? I just wanted to make sure it would be some sort of symbol rather than going "lol, backspace" or something.
Name:
Anonymous2007-10-26 5:05
>>13
Scheme in one defun (siod) is a small, lean embeddable scheme.
Name:
Anonymous2007-10-26 5:07
>>1
Don't worry, it can be a good learning exercise
Name:
Anonymous2007-10-26 5:38
>>5
A good exercise in learning to check docs more carefully? I agree.
convert from a character to ASCII code:
int c;
c = getchar();
printf("%d", (int)c);
if ((c > 31) || (c < 127)) printf("Not Printable."); >>2
Unicode is bunk. And obsolete, already.