lua-users home
lua-l archive

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


> I would expect a similar error as above but the 'success.lua' file
> successfully runs under Lua 5.4.3.  I hope these examples make my
> query clearer.

The manual does not say that Lua will raise an error. It says that you
should not do it. Search for "should not" in the manual and you will
find several similar cases:

- "You should not change the value of the control variable during the
loop."

- "This function should not be called by a finalizer."

- "A slot marked as to-be-closed should not be removed from the stack
by any other function in the API except lua_settop or lua_pop"

- "you should not use these functions for other stack values."

- "a function documented as foo(arg) should not be called without an
argument."

All these cases can (could?) raise an error, but several (all?) do
not.

-- Roberto