Dimension a[100] Rand(-1) For i=1 To 100 a[i]=Rand()>0.5 Endfor CountUps("initially") For i=1 To 100 For j=1 To 100 Step i a[j]=Not a[j] Endfor If i%5=0 CountUps("After "+Transform(i)) Endif Endfor Procedure CountUps(c) Local N, i N=0 For i=1 To 100 N = N + Iif(a[i],1,0) Endfor ? c, NIt usually gives a number anywhere between 40 and 60, and the initial number of open (i.e. a[i]=.t.) ones is in the same range. So it's either some missing piece of initial conditions, or this is very random.