lua-users home
lua-l archive

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


On Mon, 16 Oct 2000, Luiz Henrique de Figueiredo wrote:

>>I am planning a function to write a table out as Lua to recreate it,
>>as part of my configuration system. Would that be useful to you?
>
>Sample code for this already exists at lua/test/save.lua.

Unfortunately if you alter the code to call save() twice, the second
time, it serialises:

-- global environment
b=b
x=x
a=3
PI=3.141592653589793
_VERSION="Lua 4.0 (beta)"

----END

I.E. it fails to serialise the same structure more than once.
Not good.

Also, it relies on being able to insert __visited__ into each table.
I personally don't want that, hence I'm writing my own, using
a set of elements etc.

Regards,

Daniel

-- 
Daniel Silverstone                            Tel: +44 1223 525000
Global Services Engineer                      Fax: +44 1223 525100
Zeus Technology Ltd                           http://www.zeus.com/
Zeus House, St John's Innovation Park, Cowley Road CB4 0ZT England