
10 Mar
2005
10 Mar
'05
12:28 a.m.
Matthew Vogt wrote:
Suppose you write a filter which expect ASCII characters. You might want to perform arithmetic operations on characters, e.g.
if (c >= 65 && c < 91) c += 32; // Convert to lowercase.
Surely this is something you would want to discourage?
Why? I think it's usually discouraged because people should generally use locales. But if you're writing, e.g., a base64 encoder, the exact numerical values are important. I think this will be true enough of the time that I want people to be able to write c+= 32. Jonathan