[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Transferring arrays from/to FreeBasic
- From: "Mark Edgar" <medgar123@...>
- Date: Sun, 10 Jun 2007 16:12:59 -0700
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.