Path: utzoo!attcan!uunet!lll-winken!lll-lcc!ames!ucsd!orion.cf.uci.edu!oberon!skat.usc.edu!blarson From: blarson@skat.usc.edu (Bob Larson) Newsgroups: comp.lang.c Subject: Re: correct code for pointer subtraction Message-ID: <14437@oberon.USC.EDU> Date: 4 Jan 89 07:30:07 GMT References: <597@mks.UUCP> <8377@bloom-beacon.MIT.EDU> <8455@sequent.UUCP> <2237@iscuva.ISCS.COM> <609@mks.UUCP> <2245@iscuva.ISCS.COM> <22905@watmath.waterloo.edu> <2254@iscuva.ISCS.COM> Sender: news@oberon.USC.EDU Reply-To: blarson@skat.usc.edu (Bob Larson) Organization: USC AIS, Los Angeles Lines: 18 In article <2254@iscuva.ISCS.COM> carlp@iscuva.ISCS.COM (Carl Paukstis) writes: [discusssion of intel brain damage mostly omitted] >At least Microsoft provides a >way to get the correct result, albeit with some "unusual" coding - what >does it take to get the right result in another 16-bit-int environment? Pointer subtraction result is a long if int might not be big enough to hold it. A couple of bugs in beta-test Mg were related to this. This seems to be strictly an intel bug. (I've also used C compilers where pointer subtraction resulted in a 16 bit int -- but only 64k bytes of memory were addressable.) -- Bob Larson Arpa: Blarson@Ecla.Usc.Edu blarson@skat.usc.edu Uucp: {sdcrdcf,cit-vax}!oberon!skat!blarson Prime mailing list: info-prime-request%ais1@ecla.usc.edu oberon!ais1!info-prime-request