- Code: Select all Expand view
- aadd(aTab ,{ r[1],;
r[2],;
r[3],;
r[4],;
r[5],;
r[6],;
r[7],;
r[8],;
r[9],;
r[10],;
r[11],;
r[12],;
r[13],;
r[14],;
r[15],;
r[16],;
r[17],;
r[18],;
r[19],;
r[20],;
r[21],;
r[22],;
r[23],;
r[24],;
r[25],;
r[26],;
r[27],;
r[28],;
r[29],;
r[30],;
r[31],;
r[32],;
r[33],;
r[34],;
r[35],;
r[36],;
r[37],;
r[38],;
r[39],;
r[40],;
r[41],;
r[42],;
r[43],;
r[44],;
r[45],;
r[46],;
r[47],;
r[48],;
r[49],;
r[50],;
r[51],;
r[52],;
r[53],;
r[54],;
r[55],;
r[56]})
I have to check if a number is equal from field r[2] to field r[6] in the array aTab
but this applies to the first wheel
each block has 5 numbers
sample
- Code: Select all Expand view
- If ba="S"
nRuota:=1
r[2]:= ck(ba1,aTab,nruota)
r[3]:= ck(ba2,aTab,nruota)
r[4]:= ck(ba3,aTab,nruota)
r[5]:= ck(ba4,aTab,nruota)
r[6]:= ck(ba5,aTab,nruota)
Endif
I made this check function but it seems run bad
- Code: Select all Expand view
- Function ck(num,atab,nruota)
local nrow
local k1,k2,k3,k4,k5
local cond
local nNumber
local ltrovato:=.f.
IF len(atab)>0
For nrow= 1 to len(atab)
IF AScan( atab[ nrow ], { | n | n != num }, 2, 6 ) == 0
nNumber:= 0
else
nNumber:= num
ENDIF
next
ELSE
nNumber:= num
ENDIF
return nNumber
sample
the numbers with red circle not must be showed but replaced with zero because they went out in the previous draws
How I can resolve it ?