lua-users home
lua-l archive

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


Here is a similar script that is easier to interpret:

function f(a,b,...) for k=-4,4 do print(k,debug.getlocal(1,k)) end end
f(10,20,30,40,50)

The output is below.
Your complaint is that 5.3.2 no longer shows "(*vararg)" and their values?

Lua 5.3.1  Copyright (C) 1994-2015 Lua.org, PUC-Rio
-4	nil
-3	(*vararg)	50
-2	(*vararg)	40
-1	(*vararg)	30
0	nil
1	a	10
2	b	20
3	(for index)	3
4	(for limit)	4

Lua 5.3.2  Copyright (C) 1994-2015 Lua.org, PUC-Rio
-4	nil
-3	nil
-2	nil
-1	nil
0	nil
1	a	10
2	b	20
3	(for index)	3
4	(for limit)	4