Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!watmath!clyde!burl!ulysses!allegra!princeton!caip!nike!ucbcad!ucbvax!sdcsvax!ncr-sd!hp-sdd!nick From: nick@hp-sdd.UUCP (Nick Flor) Newsgroups: net.micro.amiga Subject: Re: C Philosophy Message-ID: <275@hp-sdd.UUCP> Date: Mon, 16-Jun-86 21:22:45 EDT Article-I.D.: hp-sdd.275 Posted: Mon Jun 16 21:22:45 1986 Date-Received: Wed, 18-Jun-86 04:51:11 EDT References: <8606161842.AA20107@pavepaws> Reply-To: nick@hp-sdd.UUCP (Nick Flor) Organization: Hewlett Packard, San Diego Lines: 41 In article <8606161842.AA20107@pavepaws> dillon@PAVEPAWS.BERKELEY.EDU (Matt Dillon) writes: > >>George Robbins: >> >> The Berkeley in you is showing. If you have a machine that has >>a 16 bit processor, runs faster with 16 bit operands and generates >>smaller code, it is just plain lazy to say 'looks like 32 bits to me'. >> >> As you pointed out, assuming that pointers and integers are >>the same length cause no end of portability problems. The people who >>decided that an int on a VAX should be 32 bits did the micro-world a >>big disfavor, and the doubled it with a 'nothing smaller than a VAX >>is worth worrying about...' attitude. >> >> Call a pointer a pointer, and an integer an integer (oops, >>I mean a short)... > > No, the practicality in me is showing. I don't have a machine that >has a 16 bit processor (IBM's don't count; all of INTEL's processors are >screwed up anyway). I consider the VAX and 68000 to be 32 bit machines, even >though they have 16-bit external data paths. The registers are 32 bit. >With a good compiler, you don't really need to worry about the longer It is plainly stated in the C Reference manual the the type 'int' should reflect the most natural size for a particular machine. The only thing you can depend on is that a 'short' is no longer than a 'long'. The people who called an int on the VAX 32-bits were only following what Kern and Ritch stated on page 34. However, assuming pointers are the same size as ints, is bad programming practice, pure and simple. But hey, if Matt is the *only one* supporting his programs, who gives a shit about good programming practice. If it speeds up his productivity more power to him. ('sides, everyone knows that the only good programmers to come out of the UC system come from UCSD :-) :-) :-) Nick ---------- "Atomic Energy, accept no substitutes!!!"