Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10 5/3/83; site rochester.UUCP Path: utzoo!linus!security!genrad!grkermit!masscomp!clyde!floyd!harpo!seismo!rochester!bukys From: bukys@rochester.UUCP Newsgroups: net.lang.c Subject: subtracting two pointers Message-ID: <4552@rochester.UUCP> Date: Tue, 24-Jan-84 09:27:18 EST Article-I.D.: rocheste.4552 Posted: Tue Jan 24 09:27:18 1984 Date-Received: Fri, 27-Jan-84 07:22:07 EST References: <3472@utzoo.UUCP> Organization: U. of Rochester, CS Dept. Lines: 17 Summary: they'd better point into the same array One possible outcome of this "difference of two pointers can't fit in an int or even a long int" debate is that the difference will be defined to be implementation-dependent (close to undefined, except that op sys hackers can know what's going on) if the pointers do not reference elements of the same array. Maybe any array will be limited to having at most MAXINT elements. In fact, I will go so far as to claim that this definition is already the case. Consider a compiler for a segmented-memory machine where each array is in a different segment. Subtraction of {pointers into two different segments} is meaningless. There, ANSI-C-standardizers: a clean and simple solution. Liudvikas Bukys rochester!bukys (uucp) via allegra, decvax, seismo bukys@rochester (arpa)