You are confusing assignment and comparison.
In reply to Re: Index number repeating in for loop by hdb in thread Index number repeating in for loop by DW10