J
Jordan Abel
How so? If you're referring to the assumption of an ASCII character
set, that makes it non-portable, not completely wrong. (For that
matter, code 65 is ascii 'A', even if some particular implementation
doesn't use ASCII -- though that's admittedly a bit of a stretch.)
If UCHAR_MAX is very large, the conversion to unsigned char may not
yield 65.
Apart from that, it seems ok.
Perhaps you'd care to expand on that a bit?
I actually thought for some reason that it was undefined if the value is
outside the range of unsigned char, just like with other functions that
take an int that is meant as an unsigned char value [for example, is*()]