![]() |
if and for statements
is this:
.... .... .... for (i = 0; i <16; i++) { if (arg & j) a++; j <<= 2; } return (a & 1); .... .... .... the same as: for (i = 0; i <16; i++) { if (arg & j) { a++; } j <<= 2; } return (a & 1); |
Re: if and for statements
Yes
|
Re: if and for statements
mario.demiguel@gmail.com wrote:
> Yes It is proper Usenet etiquette to include the text you are replying to. To do this using Google groups, please follow the instructions below, penned by Keith Thompson: If you want to post a followup via groups.google.com, don't use the broken "Reply" link at the bottom of the article. Click on "show options" at the top of the article, then click on the "Reply" at the bottom of the article headers. -- Christopher Benson-Manica | I *should* know what I'm talking about - if I ataru(at)cyberspace.org | don't, I need to know. Flames welcome. |
Re: if and for statements
mario.demiguel@gmail.com wrote:
> Yes Yes, what? -- Please quote enough of the previous message for context. To do so from Google, click "show options" and use the Reply shown in the expanded header. |
Re: if and for statements
"Default User" <defaultuserbr@yahoo.com> writes:
> mario.demiguel@gmail.com wrote: > >> Yes > > Yes, what? Yes, Sir? -- Keith Thompson (The_Other_Keith) kst-u@mib.org <http://www.ghoti.net/~kst> San Diego Supercomputer Center <*> <http://users.sdsc.edu/~kst> We must do something. This is something. Therefore, we must do this. |
Re: if and for statements
Paminu wrote:
> > is this: [... code that differs only at ...] > if (arg & j) a++; [...and...] > if (arg & j) > { > a++; > } [... the same? ...] Yes. -- +-------------------------+--------------------+-----------------------------+ | Kenneth J. Brody | www.hvcomputer.com | | | kenbrody/at\spamcop.net | www.fptech.com | #include <std_disclaimer.h> | +-------------------------+--------------------+-----------------------------+ Don't e-mail me at: <mailto:ThisIsASpamTrap@gmail.com> |
Re: if and for statements
On Tue, 04 Oct 2005 21:45:44 +0200, Paminu <jadajada@asd.com> wrote:
>is this: >... >... >... >for (i = 0; i <16; i++) >{ > if (arg & j) a++; > j <<= 2; >} > >return (a & 1); >... >... >... > >the same as: >for (i = 0; i <16; i++) >{ > if (arg & j) > { > a++; > } Yes. If the "range" of the if is a single statement, the braces are optional. > > j <<= 2; > >} > >return (a & 1); <<Remove the del for email>> |
Re: if and for statements
Groovy hepcat Keith Thompson was jivin' on Tue, 04 Oct 2005 20:46:43
GMT in comp.lang.c. Re: if and for statements's a cool scene! Dig it! >"Default User" <defaultuserbr@yahoo.com> writes: >> mario.demiguel@gmail.com wrote: >> >>> Yes >> >> Yes, what? > >Yes, Sir? Yes, Sir, three bags full, Sir. :) -- Dig the even newer still, yet more improved, sig! http://alphalink.com.au/~phaywood/ "Ain't I'm a dog?" - Ronny Self, Ain't I'm a Dog, written by G. Sherry & W. Walker. I know it's not "technically correct" English; but since when was rock & roll "technically correct"? |
[ot]Re: if and for statements
Peter Shaggy Haywood wrote:
> > Groovy hepcat Keith Thompson was jivin' on Tue, 04 Oct 2005 20:46:43 > GMT in comp.lang.c. > Re: if and for statements's a cool scene! Dig it! > > >"Default User" <defaultuserbr@yahoo.com> writes: > >> mario.demiguel@gmail.com wrote: > >> > >>> Yes > >> > >> Yes, what? > > > >Yes, Sir? > > Yes, Sir, three bags full, Sir. :) One for the little boy who lives down the drain. "Lane" was not in my vocabulary when I learned this. -- pete |
| All times are GMT. The time now is 04:48 AM. |
Powered by vBulletin®. Copyright ©2000 - 2013, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.