[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: How to execute a string in v. 5.2?
- From: marbux <marbux@...>
- Date: Fri, 12 Aug 2011 10:35:39 -0700
On Fri, Aug 12, 2011 at 9:55 AM, Jorge <xxopxe@gmail.com> wrote:
> On vie, 2011-08-12 at 09:48 -0700, marbux wrote:
>> "To load and run a given string, use the idiom
>>
>> assert(loadstring(s))()
>>
>> ... the execution is performed by the callback?
>
> The execution is done by the parentheses you see at the end of the line.
> It's the usual function call, they say "take whatever is before us, and
> invoke it as a function".
Very cool. This should solve one project headache. Thank you.
Best regards,
Paul