[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: How to load more than a file from C
- From: steve donovan <steve.j.donovan@...>
- Date: Wed, 30 Apr 2014 10:39:56 +0200
On Wed, Apr 30, 2014 at 10:32 AM, Thijs Schreijer
<thijs@thijsschreijer.nl> wrote:
> Depending on the type of system, it requires that a filesystem is present and you need to point the LUA_PATH environment variables to your USB location.
Let me quickly describe a simpler method:
-- file_y.lua
function func_y() .... end
-- file_x.lua
function func_x()
func_y()
end
I assume this is the situation, and that you then call func_x directly
from C as a global.
If you loaded *all* the Lua files on the stick, in *any* order, before
calling your entry point, then func_y and func_y are defined globally,
and so func_x works without any other work needed.