[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Overriding return values
- From: "Soni L." <fakedme@...>
- Date: Sat, 20 Dec 2014 19:43:16 -0200
On 20/12/14 07:27 PM, Sean Conner wrote:
I want `return Return()` inside a string.gsub to make the string.gsub
return whatever I pass to the Return function. I want to be able to pass
a function as a callback and force the called function to return early.
I want to be able to `x = x and ((x == y and Return()) or (x == z and
a)) or b`. I can't do any of this with a plain return statement.
It was thus said that the Great Soni L. once stated:
So let's say I'm hacking the internals and I wanna force a Lua function
to stop and just return whatever I want instead of continuing and/or
returning what it wants to return. How can I do this?
Um ... insert a return statement where you want it to return, with the
data you want to return?
Disclaimer: these emails are public and can be accessed from <TODO: get a non-DHCP IP and put it here>. If you do not agree with this, DO NOT REPLY.