[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Is everything an expression?
- From: Jerome Vuarand <jerome.vuarand@...>
- Date: Sat, 7 Sep 2013 16:17:42 +0100
2013/9/7 Musical Notation <musicdenotation@gmail.com>:
> 1. Can code blocks have values?
No.
> 2. Is the if construct an expression and can return a value?
No.
Have a look at the language syntax in the manual:
http://www.lua.org/manual/5.2/manual.html#9
In Lua statements ('stat' in the syntax) are not expressions ('exp' in
the syntax), and expressions are not statements, even if some code
constructs (like 'functioncall') can be both.