[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: "static <type> <varname>;" like C in lua?
- From: Jorge <xxopxe@...>
- Date: Tue, 18 Mar 2014 01:13:55 -0300
On 18/03/14 01:04, email@example.com wrote:
I am in search of a way to create a variable in the scope of a
function which is persistent i.e. does not loose it content over
several calls of its funtion. best regards, mcc
Something like this?
local function give_me_a_function ()
local foo = 0
foo = foo + 1
local f = give_me_a_function()