[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Supports Lua Includefiles?
- From: Christian Vogler <cvogler@...>
- Date: Tue, 10 Apr 2001 21:06:54 +0300
On Tue, Apr 10, 2001 at 01:04:42PM -0300, Luiz Henrique de Figueiredo wrote:
> >does Lua support includefiles for often used parts of a programm, but in
> >different programms, like a header file in C?
> Simply add dofile"myfuncs.lua" at the beginning of your file.
> Lua 4.1 will have a function "require" that will avoid loading the same file
Will there also be the possibility of specifying the paths to search
in some environment variable, analogous to the PATH variable, for
example? This is pretty much necessary in order to create reusable
libraries that reside somewhere else on the system as part of a
I've written some code for lua 3.2 and lua 4.0 that does this and also
what require will do. It searches the current directory first, and
then the environment variable LUA_SCRIPT_PATH. It would be nice if
this functionality were part of the standard behavior of lua.