I have a big array
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
I made this check function but it seems run bad
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 ?
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
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)
    EndifI made this check function but it seems run bad
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 nNumbersample

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 ?
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
