Difference between char and unsigne

Stephen Clamage steve at taumet.com
Sat Jul 21 01:48:23 AEST 1990


DSTONE at WL9.Prime.COM writes:
>> Now, since all normal% characters are contained within the intersection of
>> `char' and `unsigned char', you can safely ignore this botch if you *know*
>> you're dealing with the most restrictive kind of text.

>> % Besides being true of all ASCII characters, this guarantee is also extended
>>   to the entire C source character set in non-ASCII alphabets.  Basically this
>>   forbids an EBCDIC implementation from making `char' a signed 8-bit type.

>I thought this was true, too:  but where is it in the standard?   I have
>RTFS  without  success.

Section 3.1.2.5:
"An object declared as type *char* is large enough to store any member of
the basic execution character set.  If a member of the required source
character set enumerated in 2.2.1 is stored in a *char* object, its
value is guaranteed to be positive."
-- 

Steve Clamage, TauMetric Corp, steve at taumet.com



More information about the Comp.lang.c mailing list