[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Re: Antwort: global keyword instead of local
- From: tomas@...
- Date: Mon, 28 Aug 2000 18:27:00 -0300 (EST)
> do
> local vars = {x = 0}
> function a_function_that_uses_static_vars()
> %vars.x = %vars.x + 1
> return %vars.x
> end
> end
>
> print(a_function_that_uses_static_vars())
> ==> 1
>
> print(a_function_that_uses_static_vars())
> ==> 2
The subject is changing dramatically. It starts with the
discussion about the global keyword...
Well, my example was to show how to make a recursive call without
knowing the function's name.
Tomas