Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!iuvax!purdue!mentor.cc.purdue.edu!pur-ee!lewie From: lewie@pur-ee.UUCP (Jeff Lewis) Newsgroups: comp.lang.c Subject: Re: type *var -- vs. -- type* var Message-ID: <12813@pur-ee.UUCP> Date: 8 Sep 89 20:18:08 GMT References: <4201@ohstpy.mps.ohio-state.edu> <29048@news.Think.COM> Reply-To: lewie@ecn-ee.UUCP Organization: Purdue University Robot Vision Lab Lines: 16 Regarding declarations of pointers x, y and z, and question of why 'int* x, y, z' doesn't do what's 'intuitive': >That's because "*" binds more tightly than ",". If you want to force >a particular grouping, use parentheses: > > (int *) x, y, z > '(int *) x' is a cast, not a declaration. Compiling the above yields errors about x, y and z being undeclared. Because there's no explicit separator between declarations and statements, you'll never be able to declare pointers as such. Isn't C syntax fun? -- Jeff Lewis (lewie@ee.ecn.purdue.edu, pur-ee!lewie)