lua-users home
lua-l archive

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


On 10 Nov 2012, at 12:25, spir wrote:

> Is there a way to pass additional params to the function pointed by __tostring? (Would be practicle for instance to pass the set of already seen tables in stringing functions specialised for arrays, maps, objects, trees…)

I can't envisage an example of where this is necessary or useful. However, can you not just use an upvalue in your tostring to store previously passed values? 

Thanks,
Kev