Re: Walking a list



On Wed, 27 Jun 2007 21:40:59 +0200, Pascal Bourguignon wrote:

Indeed, and my reasoning doesn't involve presence or absence of a
"previous" link, but the presence of absence of ANY link, vs the
pointer arithmetic used. When you follow links, you don't do pointer
arithmetic in C. When you do pointer arithmetic in C you aren't
dealing with lists, but with vectors (what they call "arrays").

Those aren't usually circular, though, so while I think that the OP was
probably just being unreasonably flip, perhaps he's using some magic C++
iterator juju and calling it C by mistake.

Where's the harm in asking for more information, or just jumping straight
to offering caddr or nth as options?

Cheers,

--
Andrew

.