Add another example of function call without parens

Function calls using a table literal as its sole parameter
may also omit parentheses
This commit is contained in:
Rob Hoelz 2013-09-04 11:41:42 +02:00
parent 6c53c05dcc
commit 57e0ac7e95

View File

@ -136,6 +136,10 @@ local g; g = function (x) return math.sin(x) end
-- Calls with one string param don't need parens:
print 'hello' -- Works fine.
-- Calls with one table param don't need parens
-- either (more on tables below):
print {} -- Works fine too.
----------------------------------------------------
-- 3. Tables.