Path: utzoo!utgpu!attcan!ncrcan!hcr!stacey From: stacey@hcr.UUCP (Stacey Campbell) Newsgroups: comp.lang.c Subject: Re: When it is amoral... (Re: When is a cast not a cast?) Message-ID: <593@hcr.UUCP> Date: 9 May 89 19:37:14 GMT References: <2765@buengc.BU.EDU> <563@lzaz.ATT.COM> <4093@ficc.uu.net> Reply-To: stacey@hcrvax.UUCP (Stacey Campbell) Organization: HCR Corporation, Toronto Lines: 17 In article <4093@ficc.uu.net> peter@ficc.UUCP writes: >In article <563@lzaz.ATT.COM>, hutch@lzaz.ATT.COM (R.HUTCHISON) writes: >> midpoint_pointer = (start_pointer + end_pointer) / 2; > >You're right. It's a valid operation. > >(what's the average of the 7 clubs and the 9 clubs?) Que? On a segmented architecture p1 + p2 blows up badly. How about; mid = start + (end - start) / 2; -- Stacey Campbell, HCR Corporation, {lsuc,utzoo,utcsri}!hcr!stacey