comp.lang.ada
 help / color / mirror / Atom feed
From: "chris.danx" <spamoff.danx@ntlworld.com>
Subject: Common sense...
Date: Fri, 5 Jul 2002 18:19:00 +0100
Date: 2002-07-05T18:19:00+01:00	[thread overview]
Message-ID: <EykV8.2130$7i3.128975@newsfep1-win.server.ntli.net> (raw)

Hi,

What's the right thing to do in the following scenario concerning iterators
and lists?

A list is in use by three iterators, A, B and C.  A is at the position
preceding B and C, C calls the remove subroutine on that node and moves on.
The nodes iterator count which was 2 is decreased to 1.  B is the only
iterator using that node, but A wants to moves to the next position before B
exits the node (if B had exited the node prior to A calling next, there'd be
no problem).  Where does A go?  Does it go to the node at B or does it go to
the one after B?

I'd say A skips the node but I've got to go, Dinners out, and so can't
explain my thoughts on why until later!

Thanks,
Chris





             reply	other threads:[~2002-07-05 17:19 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-07-05 17:19 chris.danx [this message]
2002-07-05 17:28 ` Common sense Wes Groleau
2002-07-05 17:58   ` chris.danx
2002-07-05 21:34     ` Wes Groleau
2002-07-05 18:31 ` Jeffrey Carter
2002-07-05 18:54   ` chris.danx
2002-07-06  1:26     ` Jeffrey Carter
2002-07-06 10:28       ` chris.danx
2002-07-06 20:07         ` Jeffrey Carter
2002-07-06  6:52   ` Simon Wright
2002-07-05 20:16 ` chris.danx
2002-07-06  6:51 ` Simon Wright
2002-07-12 18:01   ` chris.danx
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox