Dude, I told you to use code tags!
One option would be to read the value to a temp string. Test that for "stop". If it is stop assign the new element that value. Else break. Then outside of the loop test that string for "stop" and do what you want then.
twomers
Posting Virtuoso
1,877 posts since May 2007
Reputation Points: 453
Solved Threads: 57
I realised you inlinecode-ed it. I edited my last post.
twomers
Posting Virtuoso
1,877 posts since May 2007
Reputation Points: 453
Solved Threads: 57
EIther test the name before you enter it into the name array and break out of the loop if it equals "stop" without entering "stop" into the array (which is what I think twomers is suggesting) or, alternatively, leave "stop" as a name in the array, but when you display the array check if the name equals "stop". If it does, break out of the loop before you would print "stop" or the junk in the int array that has the same index as "stop".
Lerner
Nearly a Posting Maven
2,382 posts since Jul 2005
Reputation Points: 739
Solved Threads: 396