Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!news.glorb.com!border3.nntp.dca.giganews.com!Xl.tags.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!local2.nntp.dca.giganews.com!nntp.earthlink.com!news.earthlink.com.POSTED!not-for-mail NNTP-Posting-Date: Sun, 27 May 2012 13:20:40 -0500 Message-ID: <4FC27072.638B@mindspring.com> Date: Sun, 27 May 2012 14:20:34 -0400 From: pete Reply-To: pfiland@mindspring.com Organization: PF X-Mailer: Mozilla 3.04Gold (WinNT; I) MIME-Version: 1.0 Newsgroups: comp.lang.c Subject: Re: Array addressing styles: arr[i].d[j] versus pArr->d[j], etc. References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Lines: 27 X-Usenet-Provider: http://www.giganews.com NNTP-Posting-Host: 4.154.221.107 X-Trace: sv3-KulJgwrIyJWLUgv5m82tUyeLNVFmoUAV5rVA+oTSy0hW681ZIdD9Iy7gfnxTQeWzIK1JcQpGvw2K5GK!3bZ9PuSWPi5P9e5b5T4HNC/C72wprP60c1CZdxEvVpLxh/EMYjwQrYEyKG2AaToLgOwb61ziUn+o!teQFJ3zDfBE= X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.40 X-Original-Bytes: 1908 Xref: csiph.com comp.lang.c:21420 Eric Sosman wrote: > > On 5/27/2012 1:30 PM, John Reye wrote: > > Hi! > > > > In writing code I often find numerous ways of expressing the same > > thing. > > I have some questions of "style" and "optimization" that I'd like to > > ask. > > [...] > > (*) - what do you think? > > I think this is Question 20.14 on the comp.lang.c Frequently > Asked Questions (FAQ) page, . I think John Reye's question was more about whether to use a const qualified variable (pst) in a function to hold the sum of two variables (st + i), when the sum was going to be used frequently and the values of the two variables were not going to change within the function. I would be inclined to use a const qualified variable in such a case. -- pete