and I made this function but it not run ok
- Code: Select all Expand view
FOR n= 2 TO 56
lCompleto:=Controllo_90(aTab,n)
next
If lCompleto
....
endif
oDbf:skip(-1)
enddo
Function Controllo_90(aTab,nCol)
local conta
local aCount:={}
LOCAL nRows := len( aTab )
LOCAL nR, nC,k
local num
local lreturn
// save on array the numbers 90
conta:= 1
do while (conta <= 90)
aadd(aCount, {conta,.f.} )
conta:= conta + 1
enddo
for nR := 1 to nRows
for nC := nCol to nCol
num:= aTab[nR, nC]
For k:=1 to len(aCount)
If aCount[k][1] = num
aCount[k][2] :=.t.
Endif
next
next
next
nConta:=0
For j:=1 to len(aCount)
If aCount[j][2]
nConta:=nConta+1
Endif
next
If nConta=90
lreturn := .t.
else
lreturn := .f.
Endif
return lreturn