[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: more modular scripts
- From: "Steve Donovan" <sjdonova@...>
- Date: Tue, 13 Jul 2004 15:32:37 +0200
Enno Rehling wrote:
> I am loading a bunch of user-scripts from a list of files, and I'm
> wondering how to keep them from messing with each other. If I have
two
> scripts defining the same identifier in the globals table (like two
> functions called action(), or two variables called size), One of
those
> scripts is going to puke.
Variables can be declared local to a file:
--one.lua--
local fred
...
--two.lua
local fred
...
These are quite separate variables! It's like file scope in C.
steve d.
--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
MailScanner thanks transtec Computers for their support.