lua-users home
lua-l archive

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


On 6/10/07, Merick <Merick_TeVaran@comcast.net> wrote:
I'm working on a project that uses lua in freebasic, is there an easy
way that I can transfer a single dimension array (with thousands of
entries)  into a lua table, and back again?

I don't know about FreeBASIC, but the Lua C API allows you two basic
choices: you can create a Lua table (array) and populate it, or you
can create a userdata which allows Lua code to access your FreeBASIC
array via the __index and __newindex metamethods.  This latter
technique is explained in section 28.4 of Programming in Lua.
http://www.lua.org/pil/28.html

    -Mark