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:
https://www.lua.org/pil/4.3.4.html

Le jeu. 15 nov. 2018 à 14:46, Albert Chan <albertmcchan@yahoo.com> a écrit :
On Nov 15, 2018, at 8:23 AM, Philippe Verdy <verdy_p@wanadoo.fr> 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 ?