Herbert Rosenau wrote in a message to Thomas Seeling:
HR> No. The only garanteed is: digits are contigous. So '0' through '9'
HR> can be simple in/decremented. But letters not.
Correct.
HR> But practise thows tha independant of chasets and real computers it
HR> would go. And if you don't mix numbers and letters (like 0x41 for
HR> 'A') and uppercase and lowercase it would be independant of ASCII
HR> or EBCDIC.
No, EBCDIC letters are not contiguous.
The obvious solution I talked about would of course be:
const char lookuptable[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
etc.
greetings,
Tom
tomtorfs@village.uunet.be
--- timEd/2 1.10.y2k+
900/525
* Origin: 80X86 BBS 32-15-24.62.32 V.34/V.FC (24h/24h) (2:292/516)
|