lua-users home
lua-l archive

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

Hi David,

I asked the similar question 2 or 3 weeks ago. you can search the list
for "linked variable".

Basicly, as Rici pointed out, there is no such functionality in Lua, a
workaround is using a table to hold a variable..


On 18/12/06, David KOENIG <> wrote:
Is there any way to make two variables point to the same exact object,
as with references or typeglob assignment in Perl?

Example in Perl:
$a = 5;
*b = $a;
print $b; #prints 5
$a = 6;
print $b; #prints 6

I've tried messing with _G and all that, but no luck so far.