Path: utzoo!mnetor!uunet!husc6!bloom-beacon!gatech!hao!ames!sri-spam!rutgers!uwvax!umn-d-ub!umn-cs!mmm!ems!viper!john From: john@viper.Lynx.MN.Org (John Stanley) Newsgroups: comp.lang.c Subject: Re: C sintax Message-ID: <594@viper.Lynx.MN.Org> Date: 8 Feb 88 08:29:45 GMT References: <501@m10ux.UUCP> <165600034@uiucdcsb> Reply-To: john@viper.UUCP (John Stanley) Organization: DynaSoft Systems Lines: 28 In article <165600034@uiucdcsb> wsmith@uiucdcsb.cs.uiuc.edu writes: > >main() >{ > int a,b; > > a = 0; b = 0; > > printf("%0d",a+++b); >} > >Is this (a++)+b or a+(++b)? > >Bill Smith >pur-ee!uiucdcs!wsmith >wsmith@a.cs.uiuc.edu Because the C parser is defined as always taking the largest number of characters that can be interpreted as a single token, and that it scans from left to right, the answer should always be: ((a++)+b) --- John Stanley (john@viper.UUCP) Software Consultant - DynaSoft Systems UUCP: ...{amdahl,ihnp4,rutgers}!meccts!viper!john