[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: table reset
- From: Jamie Webb <j@...>
- Date: Tue, 13 Jul 2004 02:55:36 +0100
On Mon, Jul 12, 2004 at 07:48:00AM +0200, Kaos wrote:
> Jamie Webb wrote:
> >On Sat, Jul 10, 2004 at 06:44:21PM +0200, Markus Huber wrote:
> >>-- Wich version is better and why? Any suggestions are welcome.
> >[snip] In fact, as written, it won't work at all. The declaration of
> >Lines needs to be moved outside the loop.
> I would agree, if it wasn't for the ... or {} part, which I actually
> think would make it work as intended (not tested).
Nope. That line will just always be equivalent to 'local Lines = {}',
i.e. all lines will be discarded immediately after they are read. The
problem is that because Lines is declared inside the loop, its scope
does not extend across iterations.
-- Jamie Webb