lua-users home
lua-l archive

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


>I was trying to suggest a mechinism for jumping to the scope of a table,
>like "use x do ... end" in Pascal (was it use? i havent used pascal for a
>while). i think it scans better:
>eg.
>
>table1.table2.table3 = { a=1,b=2 }
>
>use table1.table2.table3 do
>    local c = a+b
>end

How about

do
 local g=globals(table1.table2.table3)
 local c = a+b
 globals(g)
end

--lhf