Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SCAN FOR...... problem
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
SCAN FOR...... problem
Divers
Thread ID:
00175495
Message ID:
00175495
Vues:
63
Hi all,

I have a nested loop with 2 FOR...ENDFOR and a SCAN...ENDSCAN.

FOR I = 1 TO ALEN(myArray1)
sele my table1
set filter to myField1 = myArray1[I]
go top
FOR J = 1 TO ALEN(myArray2)
sele mytable1
go top
SCAN FOR myField2 = myArray2[J] WHILE !EOF('myTable1')
locate for myVar = myTable2.myField1
.
.
.

ENDSCAN
ENDFOR
ENDFOR

When I debug the loop, the scan searches in myTable 1 properly for myArray2[1]. When the FOR loop is incremented, the record pointer is still looking at records with myArray2[1] and seems to overlook the change in parameters.

TIA
Perry E. Chrzanowski
Programmer/Analyst
Saturn (Solutions) Inc.
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform