[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: 2nd version: try..catch for Lua, now 'finally' supported
- From: "Hu Qiwei" <huqiwei@...>
- Date: Thu, 31 Jan 2008 12:00:40 +0800
I've tried the code, it works but the result shows:
nil 2 3 4
so I will fix this bug later.
On Jan 31, 2008 11:46 AM, alex.mania@iinet.net.au
<alex.mania@iinet.net.au> wrote:
> I'm very impressed that you managed to handle the generic case of:
>
> function foo(...)
> local x, y = 1, 2
> try
> return x or y, ...
> finally
> x = nil
> end
> end
> print(foo(2, 3, 4))
>
> Cases like that thwarted my attempts when I tried a while back..
>
> - Alex
>