Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Posting-Version: version B 2.10.1 6/24/83; site opus.UUCP
Path: utzoo!watmath!clyde!burl!hou3c!hocda!houxm!houxz!vax135!floyd!cmcl2!seismo!hao!cires!nbires!opus!rcd
From: rcd@opus.UUCP (Dick Dunn)
Newsgroups: net.unix-wizards,net.lang.c
Subject: Re: Why chars unsigned on 3B?
Message-ID: <532@opus.UUCP>
Date: Tue, 5-Jun-84 22:29:31 EDT
Article-I.D.: opus.532
Posted: Tue Jun  5 22:29:31 1984
Date-Received: Thu, 7-Jun-84 19:05:17 EDT
References: <310@basser.SUN> <479@wjh12.UUCP>
Organization: NBI, Boulder
Lines: 18

>Is it true what I have heard, there are instructions on the 3B to
>implement signed chars easily?  If so, why are chars unsigned in C?

Because someone is trying to drive home the fact that you shouldn't program
in a way that depends on whether chars are signed! :-)

Seriously, why not have chars unsigned by definition on this machine?
There's one particular problem - we've gotten a mess somewhere in the long
path from concept to implementation:  Char not only means a character; it
means an 8-bit quantity.  (I know - where does it say that?  I'm talking
practice here.)  So in a sense, when you mean "signed 8-bit integer" you
say "char" on most machines.  If you mean "unsigned 8-bit integer" you say
"unsigned char".  But how do you say "signed 8-bit integer" on the 3B?  You
get frustrated, kick the terminal, and end up in a cast.  I wish that
tradition hadn't gotten us into this corner...
-- 
Dick Dunn	{hao,ucbvax,allegra}!nbires!rcd		(303)444-5710 x3086
	...Never offend with style when you can offend with substance.