[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: RE: Some newbie questions
- From: "Virgil Smith" <Virgil@...>
- Date: Thu, 24 Jun 2004 17:42:49 -0500
1. You can register C functions into Lua to be made available to your
2. All loaded functions will remain in the Lua state unless specifically
Functions in Lua are just values assigned to "variables", and will remain
until they are overwritten.
3. The Lua script loading routines (lua_loadfile, etc.) return a function
representing the script. So if particular scripts represent repeatable
operations then you can just load them and assign them to an appropriately
named global variable, then call them when needed.
I hope that makes things clearer.
[mailto:email@example.com]On Behalf Of Boguslaw
Sent: Thursday, June 24, 2004 4:34 PM
To: Lua list
Subject: Re: Some newbie questions
Maybe a dumb question,but...
Is it possible to put common functions not in a file but in memory buffer
and some Lua function can locate them when required ? I need load some Lua
scripts from database but common functions should be in memory
buffer/string loaded at program start and always available to scripts.
I'm newbie in Lua.