lua-users home
lua-l archive

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


Stefan Reich <stefan.reich.maker.of.eye@googlemail.com> wrote:
> On Sat, Oct 1, 2011 at 7:32 PM, Peter Cawley <lua@corsix.org> wrote:
>
> > The message to take away from this is that things are truncated to
> > exactly 1 result iff they are not the last thing in an expression
> > list.
>
> Why is that done? Strikes me as rather confusing. (The OP obviously
> fell for it too.)

It allows Lua to assemble an argument list or insert elements into a table
using register numbers (on the stack) or table indexes that are known at
compile time, except for function calls at the end of the list.

Tony.
-- 
f.anthony.n.finch  <dot@dotat.at>  http://dotat.at/
Viking, North Utsire: Southerly veering southwesterly 6 to gale 8,
occasionally severe gale 9 at first in northwest Viking. Moderate or rough
becoming very rough or high. Rain then squally showers. Moderate or good,
occasionally poor.