lua-users home
lua-l archive

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



On 27-Oct-06, at 10:04 PM, Jean-Francois Goulet wrote:

Does anyone knows why lua returns the name of some locals as "(*temporary)"? I've looked at the source code, and in the ldebug.c file, in the static const char *findlocal (lua_State *L, CallInfo *ci, int n) function, it return such a name in certain conditions. Does anyone has an idea why? Is there a way to recuperate the actual "scripted" name associated with such a local?
 

Such values are not actually local variables, so there was no scripted name.

For example, to evaluate:

  local e = (a + b) * (c + d)

Lua (like any other language) has to effectively do:

  local e do
  local t1 = a + b
  local t2 = c + d
  e = t1 + t2
  end

t1 and t2 are reported as (temporary), which they indeed are.