|
On 11-Nov-04, at 11:54 AM, Mark Hamburg wrote:Is it useful to be ableto capture a variable and then create a new variable with the same name inwhat appears to be the same scope?
I just remembered another (perhaps odd) use of nested scoping: to wrap a script into a function call while keeping a function argument (or local) protected from the script: script = [[ function(secret, a) -- do something with secret do local secret = nil ]] .. script .. [[ end return secret end ]]