Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!ncar!tank!mimsy!chris From: chris@mimsy.UUCP (Chris Torek) Newsgroups: comp.lang.c Subject: Re: type *var -- vs. -- type* var Message-ID: <19489@mimsy.UUCP> Date: 9 Sep 89 04:09:32 GMT References: <4201@ohstpy.mps.ohio-state.edu> <29048@news.Think.COM> Organization: U of Maryland, Dept. of Computer Science, Coll. Pk., MD 20742 Lines: 26 In article <29048@news.Think.COM> barmar@think.COM (Barry Margolin) writes: >They are equivalent. The "*" is a separate token, and whitespace >between tokens is not significant. Right. >> int* x, y, z; >>is equivalent to >> int *x, y, z; (which is why I, for one, will not use the former layout). >That's because "*" binds more tightly than ",". If you want to force >a particular grouping, use parentheses: > > (int *) x, y, z Nice idea, but you had better go read a C BNF. Parentheses are not permitted there. You can, however, use typedef: typedef int *pointer_to_int; pointer_to_int x, y, z; -- In-Real-Life: Chris Torek, Univ of MD Comp Sci Dept (+1 301 454 7163) Domain: chris@mimsy.umd.edu Path: uunet!mimsy!chris