lua-users home
lua-l archive

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


On 9/05/2008, at 8:31 AM, Till Harbaum / Lists wrote:

Hi list,

i am trying to extend the tostring function to do something special
for my own special use tables. I found some example using the syntax
below:

function tostring(a)
  -- do something for special tables ...
  -- otherwise call original function:
  return %tostring(a)
end

Can't you do this?  I don't know about the %.

local std_tostring = tostring

function tostring(a)
  -- do something for special tables ...
  -- otherwise call original function:
  return std_tostring(a)
end

Cheers,
Geoff