DMD 1.019 and 2.003 releases
BCS
BCS at pathlink.com
Wed Jul 25 15:25:54 PDT 2007
Russell Lewis wrote:
> James Dennett wrote:
>
>> With D, at present, probably none. Some mainframes and
>> some embedded environments are the only remaining ones
>> I know about (though my knowledge is, of course, a long
>> long way from being encyclopedic.)
>
>
> IBM still builds some machines which use EBCDIC, but with EBCDIC, things
> are even worse: the characters aren't even arranged contiguously in the
> space! So in EBCDIC
> char c;
> int i = c - 'a';
> won't work!
>
a-f and A-F are sequential so that works (after case conversion) and
also a & A are different by only one bit so:
c |= 'a' ^ 'A'
c &= ~('a' ^ 'a')
works, as does
c += ('a' - 'A')
More information about the Digitalmars-d-announce
mailing list