[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Break statement, again.
- From: Roberto Ierusalimschy <roberto@...>
- Date: Thu, 02 Sep 1999 17:03:02 -0300
> local Loop = function( i )
> [ loop code ]
> if( i == %endvalue ) then
> return
> end
> [ more loop code ]
> Loop( i + %increment )
> end
> Loop( startvalue )
That would not work. Loop is local, so your recursive call should be %Loop.
But Loop is not defined when the function is instantiated, so %Loop will be
nil. You need something equivalent to "letrec" to do that.
-- Roberto