|
|
||
|
Thank You for answer
1. You can register C functions into Lua to be made available to your scripts.
2. All loaded functions will remain in the Lua state unless specifically removed. Functions in Lua are just values assigned to "variables", and will remain until they are overwritten.
I think I understand.
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 appreciate any help.
Boguslaw
I hope that makes things clearer.
-----Original Message----- From: lua-bounces@bazar2.conectiva.com.br [mailto:lua-bounces@bazar2.conectiva.com.br]On Behalf Of Boguslaw Brandys 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.
Boguslaw
-- Best Regards Bogusław Brandys