lua-users home
lua-l archive

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

Not all, according to the Lua doc in section 4.3.4 (Numeric for), the behavior is unspecified. I bet that the interpreter mode uses the 2nd approach which is simpler, but may give different results.
This is stated at end of this page:

Le jeu. 15 nov. 2018 à 14:46, Albert Chan <> a écrit :
On Nov 15, 2018, at 8:23 AM, Philippe Verdy <> wrote:

> My opinion is that Lua should have been defined so that only the first (stateless) behavior is valid, and so "for x=(a),(b) do (...) end" should always behave like "for x in foriter(a, b) do (...) end"

Does any version of Lua *not* do this way ?