Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!cornell!rochester!rutgers!att!lzaz!hutch From: hutch@lzaz.ATT.COM (R.HUTCHISON) Newsgroups: comp.lang.c Subject: Re: When it is amoral... (Re: When is a cast not a cast?) Message-ID: <563@lzaz.ATT.COM> Date: 5 May 89 13:00:56 GMT References: <2765@buengc.BU.EDU> Organization: AT&T ISL Lincroft NJ USA Lines: 18 Re: addition of two pointers How 'bout in a binary search to find the middle char in an array of characters? midpoint_pointer = (start_pointer + end_pointer) / 2; Yes, I realize that you can... midpoint_pointer = ((end_pointer - start_pointer) / 2) + start_pointer; ... but I think people were asking when you might ever want to add two pointers and where it could possibly me meaningful. After all, if the two variables were not pointers and represented distances (in feet) and I wanted the midpoint, I might choose the first approach. Bob Hutchison lzaz!hutch