[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Multiple values returned or vararg expression in numeric for loop
- From: Dimitris Papavasiliou <dpapavas@...>
- Date: Fri, 14 Sep 2012 21:02:15 +0300
> I get "'for' step must be a number" in both versions.
Perhaps I'm misunderstanding something. I just noticed that Roberto's
code actually has inc with a capitalized I in the first line and 1nc
with the digit one instead of the capital I in the second. If I copy
that into the interpreter I get the error message you mention in both
cases. If I use Inc with a capital I in both lines then the for loop
does the expected thing in both versions of Lua. If the misspelled
Inc is intentional, why wouldn't this raise an error. Could the digit
one followed by letters, a malformed number, be considered a legal
token somehow?