Re: Learning C with Older books ?.
From: Michael Wojcik (mwojcik_at_newsguy.com)
Date: 12/17/04
- Next message: Wojtek: "berkeley db"
- Previous message: Lawrence Kirby: "Re: Why does ANSI not define a function to determine the size of (m)allocated mem? (like _msize)"
- In reply to: Charlie Gordon: "Re: Learning C with Older books ?."
- Next in thread: Lawrence Kirby: "Re: Learning C with Older books ?."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 17 Dec 2004 17:00:06 GMT
In article <cpsr24$r8q$1@reader1.imaginet.fr>, "Charlie Gordon" <news@chqrlie.org> writes:
> "Lawrence Kirby" <lknews@netactive.co.uk> wrote in message
> news:pan.2004.12.16.14.05.20.500000@netactive.co.uk...
> >
> > for (size_t i = sizeof x; i != 0; ) {
> > i--;
> > ...
> > }
>
> i > 0 works as well and is more natural.
Where in nature does "i > 0" occur?
You may prefer it, but it is nothing more than a preference. Spare
us the bogus claims about what is "natural" C syntax.
Personally, I'd be just as happy with a plain "i" for the second "for"
expression. I know what it means; any competent C programmer knows
what it means; someone learning C either knows what it means or needs
to learn; no one else should be reading the code.
--
Michael Wojcik michael.wojcik@microfocus.com
Not the author (with K.Ravichandran and T.Rick Fletcher) of "Mode specific
chemistry of HS + N{_2}O(n,1,0) using stimulated Raman excitation".
- Next message: Wojtek: "berkeley db"
- Previous message: Lawrence Kirby: "Re: Why does ANSI not define a function to determine the size of (m)allocated mem? (like _msize)"
- In reply to: Charlie Gordon: "Re: Learning C with Older books ?."
- Next in thread: Lawrence Kirby: "Re: Learning C with Older books ?."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|