Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!rutgers!dayton!viper!dave From: dave@viper.UUCP (David Messer) Newsgroups: comp.lang.c Subject: Re: structure element offsets Message-ID: <428@viper.UUCP> Date: Mon, 8-Dec-86 04:31:06 EST Article-I.D.: viper.428 Posted: Mon Dec 8 04:31:06 1986 Date-Received: Sun, 7-Dec-86 13:55:57 EST References: <1096@spice.cs.cmu.edu> <768@nike.UUCP> <3622@watmath.UUCP> <419@viper.UUCP> <3810@watmath.UUCP> Reply-To: dave@viper.UUCP (David Messer) Organization: Lynx Data Systems, Minneapolis, MN Lines: 25 Keywords: structure, offset In article <3810@watmath.UUCP> rbutterworth@watmath.UUCP (Ray Butterworth) writes: >> however, for good or ill, >> C has been defined such that all members-of-structures share the >> same name-space. >This hasn't been true for many years. >Are there still any compilers out there that can't handle this? >struct one {int a; int b;}; >struct two {float b; float a}; Well, I learn something new everyday! The last time I checked it (back about 5 years ago on Version 7) the statement I made was true. Now it is not. The MS-DOS C compiler I used in that time had all MOS' in the same name-space, so I never suspected that they changed it in the real (UNIX) world. I thank you for pointing this out to me, and apologize for my earlier, stupid statements. I think that I will stop citing Kernighan & Ritchie since the world seems to have proceeded past them. The following statement used to be true: -- Disclaimer: | David Messer I'm always right and I never lie. | Software Consultant My company knows this and agrees | UUCP: ihnp4!quest!viper!dave with everything I say. | ihnp4!meccts!viper!dave