Forums Register Login

for loop

+Pie Number of slices to send: Send
Hi all,
Here I go. I'm running a method which uses a for loop to run through a StringBuffer until a criteria is matched. The loop then continues until the criteria is matched again. At this point the data is manipulated. Now when my method is called again the loop starts from zero again, ie endless loop. Is there anyway I can get the loop to start where it finished once the method is called again.
Thanks guys and girls
+Pie Number of slices to send: Send
Tim, It would be a lot easier to answer your question if you gave us some code to look at.
+Pie Number of slices to send: Send
In your for loop initialization where you normally say "int i=0;"
instead you say
int x = 0;
for (int i = x; etc)
then you control the value of the x so that the next time is starts at something other than 0.
Quick! Before anybody notices! Cover it up with this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 595 times.
Similar Threads
Concurrence and dirty read in findByCriteria method
DataInfo[] criteriaFind(String criteria);
B&S Find method in the Interface.
getRecord Vs readRecord usage in criteriaFind()
Help needed with regex!
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 29, 2024 00:25:38.