lua-users home
lua-l archive

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


Right, I was being sloppy. Thanks for the correction because it was misleading.

— Gabriel


On Thu, Nov 15, 2018 at 6:19 PM Tim Hill <drtimhill@gmail.com> wrote:
>
>
> > On Nov 15, 2018, at 3:22 PM, Gabriel Bertilson <arboreous.philologist@gmail.com> wrote:
> >
> > So the function expression
> > `function () return x end` either returns an upvalue or a global, and
> > the assignment `x = 10` is resolved to an assignment
>
> Actually it doesn’t return an upvalue OR a global .. it returns whatever value was in ‘x’ when the function was called.
>
> —Tim
>
>