[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: removing elements while looping with an index, and return values fro
From: |
Ken Gosier |
Subject: |
Re: removing elements while looping with an index, and return values from Set add |
Date: |
Wed, 20 Mar 2002 06:49:35 -0800 (PST) |
--- Paul Johnson <address@hidden> wrote:
> Well, maybe I can. Am I right in guessing that your
> pseudo code like so:
> if ( condition[i] )
> is in the actual program something more elaborate, like
>
> if (condition[i]== [thisElem getValue])
>
It is pretty much like this, except that the conditions are
not mutually exclusive. That is, in oldList, you have 3
types of elements:
- Those that satisfy condition[0]
- Those that satisfy condition[1]
- Those that satisfy neither.
Basically, the problem is that the elements that satisfy
condition[0] will get removed. Then when I'm looping to
find those that satisfy condition[1], the index falls off
the end of the List.
=====
Ken Gosier
address@hidden
__________________________________________________
Do You Yahoo!?
Yahoo! Sports - live college hoops coverage
http://sports.yahoo.com/
==================================
Swarm-Support is for discussion of the technical details of the day
to day usage of Swarm. For list administration needs (esp.
[un]subscribing), please send a message to <address@hidden>
with "help" in the body of the message.