[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Help on walking lists of Swarm Collection
From: |
Marcus G. Daniels |
Subject: |
Re: Help on walking lists of Swarm Collection |
Date: |
08 May 1999 12:07:11 -0700 |
>>>>> "WS" == William S Shu <address@hidden> writes:
WS> A person or mosquito may have a number of such populations (for
WS> whatever reason) and hence we put them in the person or mosquito's
WS> colonyList (the list of all population colonies it has). When a
WS> person is bitten, a population (or part thereoff) may be
WS> transferred to the mosquito.
If a population is a thing that won't be duplicated within a host
(sounds like it), then I think you want this:
id <Index> index = [colonyList begin: scratchZone];
while ((population = [index next]))
{
if ([population isLeaving])
{
[colonyList remove: population];
break;
}
}
[index drop];
If you can anticipate how many populations there will be for a given run,
you might want to use an Array, with nil entries for absent populations.
(Each population would get a serial number starting from 0.)
==================================
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.