Path: utzoo!mnetor!uunet!lll-winken!lll-lcc!ames!pacbell!att-ih!ihnp4!ihlpf!nevin1 From: nevin1@ihlpf.ATT.COM (00704a-Liber) Newsgroups: comp.lang.c Subject: Re: Long Chars Message-ID: <4191@ihlpf.ATT.COM> Date: 30 Mar 88 00:29:44 GMT References: <7447@brl-smoke.ARPA> <439@splut.UUCP> <8803250401.AA01184@champlain.dgp.toronto.edu> <7546@brl-smoke.ARPA> Reply-To: nevin1@ihlpf.UUCP (00704a-Liber,N.J.) Organization: AT&T Bell Laboratories - Naperville, Illinois Lines: 24 In article <7546@brl-smoke.ARPA> gwyn@brl.arpa (Doug Gwyn (VLD/VMB) ) writes: >In article <8803250401.AA01184@champlain.dgp.toronto.edu> flaps@dgp.toronto.edu (Alan J Rosenthal) writes: >>Why do you need to make sizeof(char) == 2 just to make chars 16 bits? >>Make chars 16 bits, keep sizeof(char) == 1, ... >The idea is that you not only need to handle fat chars, you also >have applications that need to handle smaller objects (bytes, or >bits). Therefore there would have to be some object type smaller >than a char (e.g. a "short char"). This makes me think that way back when KK&R defined C, they should have called the 'char' type a 'byte' type instead. Because of existing practice (whether it be good or bad, it is common), I feel that the sizeof(char) == 1. 70% of the time that I use char I use it for doing byte-type operations (reading in from a file, etc.). There is a need for having a fundamental type (call it foo) such that sizeof(foo) == 1 can be guaranteed in *ALL* implementations. Due to existing practice, I would like that type to be called char. Just add things like 'long char' to accomodate the people who need them. -- _ __ NEVIN J. LIBER ..!ihnp4!ihlpf!nevin1 (312) 510-6194 ' ) ) "The secret compartment of my ring I fill / / _ , __o ____ with an Underdog super-energy pill." / (_