Article View: net.lang.c
Article #9629Re: Signed char - What Foolishness Is This!
From: Mike Shannon
Date: Tue, 21 Oct 1986 21:04
Date: Tue, 21 Oct 1986 21:04
14 lines
1327 bytes
1327 bytes
In <8719@duke.duke.UUCP> jwg@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}
Technical Details
Message-ID:
<228@apple.UUCP>Path:
arc1-ca.pugleaf.net!utzoo!watmath!clyde!caip!elbereth!rutgers!sri-spam!nike!lll-crg!lll-lcc!pyramid!voder!apple!mikesReferences:
<8719@duke.duke.UUCP>Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: arc1-ca.pugleaf.net!utzoo!watmath!clyde!caip!elbereth!rutgers!sri-spam!nike!lll-crg!lll-lcc!pyramid!voder!apple!mikes From: mikes@apple.UUCP (Mike Shannon) Newsgroups: net.lang.c,net.micro.pc Subject: Re: Signed char - What Foolishness Is This! Message-ID: <228@apple.UUCP> Date: Tue, 21-Oct-86 17:04:15 EDT Article-I.D.: apple.228 Posted: Tue Oct 21 17:04:15 1986 Date-Received: Wed, 22-Oct-86 06:34:15 EDT References: <8719@duke.duke.UUCP> Reply-To: mikes@apple.UUCP (Mike Shannon) Organization: Apple Computer Inc., Cupertino, USA Lines: 14