Signed char - What Foolishness Is This!

Mike Shannon mikes at apple.UUCP
Wed Oct 22 07:04:15 AEST 1986


In <8719 at duke.duke.UUCP> jwg at duke.UUCP (Jeffrey William Gillette) writes:
>
>MSC 4.0 defaults 'char' to 'signed char'.  ...
>             This works great when c = 65 ('A'), but when c = 154
>('U'umlaut) the macro produces the following: ( (_ctype+1)[-102] & UPPER )
> ....
	The problem is that the u-umlaut char is being treated as negative.
K&R, page 183, section 6.1 says "... but it is guaranteed that a member of the
standard character set is non-negative."
	Apple experienced the same problem with an extended character set.
I believe that u-umlaut is part of your machine's standard character set, and
so I would argue that MSC does not conform to K&R in this respect.
-- 
			Michael Shannon {apple!mikes}



More information about the Comp.lang.c mailing list