Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84; site watdaisy.UUCP Path: utzoo!watmath!watdaisy!ndiamond From: ndiamond@watdaisy.UUCP (Norman Diamond) Newsgroups: net.unix-wizards,net.lang.c Subject: Re: integer types, sys calls, and stdio Message-ID: <6897@watdaisy.UUCP> Date: Wed, 30-Jan-85 13:15:32 EST Article-I.D.: watdaisy.6897 Posted: Wed Jan 30 13:15:32 1985 Date-Received: Thu, 31-Jan-85 00:32:21 EST References: <1997@mordor.UUCP> <631@turtlevax.UUCP> <550@mako.UUCP> Distribution: net Organization: U of Waterloo, Ontario Lines: 26 Xref: watmath net.unix-wizards:11781 net.lang.c:4092 > ----------- new (?) idea begins here -------------------- > > OK, here's my suggestion, which may not help John (Hi John!) > port existing code, but might help in the future. > > Why not figure out how many bits each variable *needs*, and then > declare them accordingly: > int8 foo; > int16 bar; > int12 baz; > int9 buff[BUFFSIZ]; > int18 blat; > the Bavarian Beagle Snoopy tektronix!mako!seifert That's as new as PL/I is, anyway. One of the things Pascal did right was define subranges using lower and upper actual bounds, instead of number of bits ... or in other words, the bounds didn't have to be (some power of 2, minus 1). -- Norman Diamond UUCP: {decvax|utzoo|ihnp4|allegra|clyde}!watmath!watdaisy!ndiamond CSNET: ndiamond%watdaisy@waterloo.csnet ARPA: ndiamond%watdaisy%waterloo.csnet@csnet-relay.arpa "Opinions are those of the keyboard, and do not reflect on me or higher-ups."