lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


> If we now try to call f(), we will get an error, since i does not
> exist in the local namespace of f. That's all. If we wanted f()
> to work, we would have to write:
> 
> def f():
>     global i
>     i = i+1
> 
> Quite the opposite of Lua, I guess. :)
	How do you write a recursive call ?  Hope you don't have to
define f as global!

	Tomas