Information générale
Catégorie:
Codage, syntaxe et commandes
Titre:
Problem with FOR .. ENDFOR
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
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement