Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Problem with FOR .. ENDFOR
Message
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Problem with FOR .. ENDFOR
Divers
Thread ID:
00396797
Message ID:
00396797
Vues:
41
I have a FOR loop, FOR i=1 TO aval,
within the loop, a function gets called that also has a FOR loop,
FOR i=1 TO anotherval.
Basicly
procedure parent_loop
for i=1 to aval
stuff
=my_funct()
endfor

procedure my_funct
for i=1 to anotherval
do stuff
endfor

Much to my suprise, the i in the calling function gets its value reset by the called function.
Is this behaviour by design, or what? I had thought that the inner i would be out of scope for the outer
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform