lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


> > From the manual: "The variable var [loop counter] is local to the
statement;
> > you cannot use its value after the for ends." And for what it is worth,
> > neither on a an external function! (?)
> 
> You're making a mountain out of a molehill: the two globalVars are 
> different variables, one local, as declared by for, and the other global. 
> The List function is declared outside the scope of the for loop (and hence

> the local variable.

Yes, now that I have found the solution, I agree :-) As I stated, I choose
to send this anyway, in case somebody else stumble on the problem. I find this
'for' stuff neither intuitive nor obvious. I just hope to remember this
problem later :-)
Mmm, where is the closing parenthesis? :-)

> > Is it normal the problem persists in Lua 5.0?
> 
> «normal» est un faux ami: on ne peut pas l'utiliser comme «normale». La 
> problème est que, en anglais, «normal» est utilisé pour décrire quelque 
> chose qui répète. On dit "Normally I get to work at 9 o'clock", mais pas 
> "Normally I'll arrive in Paris at 6:15" (si on ne voyage regulièrement à 
> Paris!); on doit dire "I should arrive in Paris at 6:15". Ici, j'aurais 
> dit "Should the problem persist in Lua 5.0" ou "Is it correct that...".

Je préfère la deuxième forme.
Je crains utiliser de nombreux faux amis dans ce style, je n'étais pas
conscient du problème. J'espère, là aussi, m'en souvenir.
Merci sincèrement de la correction.

Regards.

-- 
--=#=--=#=--=#=--=#=--=#=--=#=--=#=--=#=--=#=--
Philippe Lhoste (Paris -- France)
Professional programmer and amateur artist
http://jove.prohosting.com/~philho/
--=#=--=#=--=#=--=#=--=#=--=#=--=#=--=#=--=#=--

GMX - Die Kommunikationsplattform im Internet.
http://www.gmx.net