Newsgroups: comp.lang.c Path: utzoo!henry From: henry@zoo.toronto.edu (Henry Spencer) Subject: Re: characters Message-ID: <1990Sep20.155415.7778@zoo.toronto.edu> Organization: U of Toronto Zoology References: <13680@hydra.gatech.EDU> <2517@idunno.Princeton.EDU> <1990Sep18.162407.15525@zoo.toronto.edu> <2657@idunno.Princeton.EDU> Date: Thu, 20 Sep 90 15:54:15 GMT In article <2657@idunno.Princeton.EDU> pfalstad@phoenix.Princeton.EDU (Paul John Falstad) writes: >Incidentally, someone sent me mail saying that neither K&R nor ANSI >specify that chars must be signed. True? Correct. On some machines, like the IBM 360/370 series -- *not* an uncommon machine, and yes, there are C compilers (and even Unix systems) for it -- you take a major performance hit if you insist that char must be signed. Char is signed or unsigned, whichever is faster. Programs should avoid depending on the specific choice. (It's not hard when you try.) >All the implementations I've come >across have chars signed, however, which is the only fact I'm interested >in. I assume, then, that you are not interested in making your code portable. Sooner or later you *will* encounter an unsigned-char machine; refusing to prepare for this event guarantees that it will be traumatic. -- TCP/IP: handling tomorrow's loads today| Henry Spencer at U of Toronto Zoology OSI: handling yesterday's loads someday| henry@zoo.toronto.edu utzoo!henry