[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Is function call a chunk in Lua?
- From: Coda Highland <chighland@...>
- Date: Wed, 26 Aug 2015 20:44:28 -0700
On Wed, Aug 26, 2015 at 8:33 PM, Nan Xiao <xiaonan830818@gmail.com> wrote:
> Hi all,
>
> According to Pil, the chunk is "simply a sequence of commands (or
> statements)". A function call is
> an expression. So for "print("Hello")", it is just an expression, not a
> statement or chunk, right?
>
> Thanks in advance!
>
> Best Regards
> Nan Xiao
The callable object creating by parsing the code "print('Hello')" is a
chunk containing a single statement that contains a function call
expression.
You generally don't deal in chunks directly unless you're using the
load() function.
/s/ Adam