Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!watmath!clyde!rutgers!dayton!meccts!viper!john From: john@viper.UUCP Newsgroups: comp.lang.c Subject: Re: Pointer Comparison and Portability Message-ID: <565@viper.UUCP> Date: Sat, 21-Feb-87 16:02:46 EST Article-I.D.: viper.565 Posted: Sat Feb 21 16:02:46 1987 Date-Received: Sun, 22-Feb-87 05:38:51 EST References: <814@cullvax.UUCP> Reply-To: john@viper.UUCP (John Stanley) Organization: DynaSoft Systems Lines: 18 Both Tom Stockfisch and Dale Worley make a good point. The method I used to construct the problem pointers is certanly illegal in standard C. My response was primarily to the people talking about how the function in question to compare two pointers could fail on a 80x86 arcitecture machine. I guess I should have made the orientation of my answer a bit more clear. Since some pointers used by programs in an MS-DOS environment are created by the operating system and not from C it is possible to have illegally constructed pointers. The original question from Neil Webber asked if the function would return TRUE if the two pointers pointed to the same "physical" character... The side-track of 80x86 pointers carried this a bit beyond questions limited only to "standard" C and I guess the failure cases will only occur when a programmer goes a bit beyond what is legal, (and I'm sure -none- of us would -ever- do anything in C that wasn't by-the-book... ;-) --- John Stanley (john@viper.UUCP) Software Consultant - DynaSoft Systems UUCP: ...{amdahl,ihnp4,rutgers}!{meccts,dayton}!viper!john