Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!tut.cis.ohio-state.edu!purdue!iuvax!ux1.cso.uiuc.edu!ux1.cso.uiuc.edu!m.cs.uiuc.edu!carroll From: carroll@m.cs.uiuc.edu Newsgroups: comp.lang.c Subject: Re: IsUnsigned() function? Message-ID: <4700058@m.cs.uiuc.edu> Date: 1 Aug 90 13:57:00 GMT References: <214155@<1990Jul16> Lines: 20 Nf-ID: #R:<1990Jul16:214155:m.cs.uiuc.edu:4700058:000:1169 Nf-From: m.cs.uiuc.edu!carroll Aug 1 08:57:00 1990 /* Written 1:22 pm Jul 31, 1990 by henry@zoo.toronto.edu in m.cs.uiuc.edu:comp.lang.c */ In article <17181@haddock.ima.isc.com> karl@kelp.ima.isc.com (Karl Heuer) writes: >>Side note: can anyone out there give a good explanation as to why >>chars were *ever* signed in the first place, >The pdp11's byte-to-word instruction did sign extension, so it was cheaper to >have chars be signed... I've heard Dennis express some doubts about this decision in retrospect, but it was a sensible thing to do at the time. /* End of text from m.cs.uiuc.edu:comp.lang.c */ The problem was that "signed" was a valid type modifier, but "unsigned" wasn't. If chars were (by default) unsigned, they could be made signed, but if they were signed, they couldn't be made unsigned. This means that under K&R(1) C, if the default char type was signed, there was no way to have unsigned chars. IMHO, this is a problem. (Now ANSI-fixed, at least). Alan M. Carroll Barbara/Marilyn in '92 : carroll@cs.uiuc.edu + This time, why not choose the better halves? Epoch Development Team CS Grad / U of Ill @ Urbana ...{ucbvax,pur-ee,convex}!cs.uiuc.edu!carroll