lua-users home
lua-l archive

Evaluating a string as a Lua Value

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


Greetings.
I have a string containing a Lua value; this will likely be a table (though may not be), and in some cases may be a very large string (ie quite a few megabytes). I want to effectively execute this string so as to get the value of it in a Lua variable; but the string will not have 'return' or anything on the beginning. eg, it may simply appear as:
"{ x = 7, y = 5}"
Is there an efficient way that I can interpret a string as a Lua value, without having to copy the string in order to prepent a 'return' or 'val ='?
Thanks.
Love, Light and Peace,
- Peter Loveday
Director of Development, eyeon Software

AltStyle によって変換されたページ (->オリジナル) /