By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,836 Members | 2,059 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,836 IT Pros & Developers. It's quick & easy.

looping through array to find next matching element

P: n/a
hi all

i have an array of Process objects, each elements has an id (process.id),
and arrival time (process.at), processing time (process.pt) and a boolean
indicating whether the process has completed (process.done).

atm, i have a loop that i going through the elements and check whether each
elements has been done, i am now at a point in the loop, where it has
discovered, that the current process (currentProcess) is done (ie.
currentProcess.done == 1).

what i want to do, is have a nested loop (im not sure what sort i need here,
this is where hopefully, one of you guys come in...) to continue going
through the array, and find the next elements where "done != 1"

i hope this question is clear, and hope even more so, that someone can help

thanks

PP

Jul 17 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.