I have a loop going with an array - say array[i] for i=0 to i<10 - with conditions, and if the conditions aren't met at a value in the array, I want to ignore the value. I have array[i-1] in the condition, so my problem is that if a value [i] is ignored in one cycle of the loop, I don't want it to be considered [i-1] in the next cycle. In that case I want [i-1] to refer to the last un-ignored value.
I'm really unsure of how to do this. Can someone set me on the right track? Thanks.