Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10 5/3/83; site bbncca.ARPA Path: utzoo!linus!bbncca!keesan From: keesan@bbncca.ARPA (Morris Keesan) Newsgroups: net.unix-wizards,net.lang.c Subject: Re: unsigned char -> unsigned int conversion Message-ID: <789@bbncca.ARPA> Date: Wed, 20-Jun-84 10:55:46 EDT Article-I.D.: bbncca.789 Posted: Wed Jun 20 10:55:46 1984 Date-Received: Thu, 21-Jun-84 01:24:52 EDT References: <2025@rlgvax.UUCP> Organization: Bolt, Beranek and Newman, Cambridge, Ma. Lines: 27 ------------------------------ > The C language does permit "unsigned short int" and "unsigned long int". > The fact that one can say "unsigned short x;" or "unsigned long x;" on many > compilers can be considered either a side-effect of the compilers being used, > . . . > Guy Harris WHICH C language? The one defined in Kernighan and Ritchie doesn't; the one defined in the System V Release 1 "Programming Guide" doesn't. The only C language DEFINITION I know of which allows unsigned shorts and longs is the System V Release 2 C Language document. The following excerpt posted recently by Jim Balter of INTERACTIVE Systems (Thank you, Jim) clearly allows "unsigned short int x", "unsigned long int x", "unsigned short x", and "unsigned long x". At most one of the words long or short may be specified in conjunction with int; the meaning is the same as if int were not mentioned. The word long may be specified in conjunction with float; the meaning is the same as double. The word unsigned may be specified alone, or in conjunction with int or any of its short or long varieties, or with char. I have no idea what the Berkeley compilers allow. -- Morris M. Keesan {decvax,linus,wjh12,ima}!bbncca!keesan keesan @ BBN-UNIX.ARPA