[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: [BUG] debug.getlocal does not pick up vararg
- From: Luiz Henrique de Figueiredo <lhf@...>
- Date: Tue, 26 Jul 2016 09:03:38 -0300
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