Xref: utzoo comp.sys.ibm.pc:22103 comp.sys.intel:593 Path: utzoo!attcan!uunet!tektronix!sequent!sch From: sch@sequent.UUCP (Steve Hemminger) Newsgroups: comp.sys.ibm.pc,comp.sys.intel Subject: Re: correct code for pointer subtraction Summary: ptr subtract only in same array Message-ID: <8455@sequent.UUCP> Date: 11 Dec 88 19:55:46 GMT References: <597@mks.UUCP> <8377@bloom-beacon.MIT.EDU> Reply-To: sch@crg2.UUCP (Steve Hemminger) Organization: Sequent Computer Systems, Inc Lines: 5 I believe the ANSI std and K&R say pointer subtraction is only allowed inside one data structure/array. Since the small/medium/large model only allows arrays <64K, only a 16bit result needs to be computed. Any code that depends on subtracting pointers into two totally seperate arrays is non-portable.