lua-users home
lua-l archive

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


Jerome Vuarand <jerome.vuarand@gmail.com> wrote:
>
> Inside your function, you can get the environment of the caller with
> getfenv, by passing it a number. You can then replace the current
> function environment with that.

But not in 5.2. Even in 5.1 it sounds like a really bad idea to me.

Tony.
-- 
f.anthony.n.finch  <dot@dotat.at>  http://dotat.at/
Viking, North Utsire, South Utsire: Southeasterly, becoming cyclonic for a
time, 5 to 7, occasionally gale 8 at first in Viking. Very rough at first in
north Viking, otherwise moderate or rough. Rain, fog patches. Moderate or
good, occasionally very poor.