summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorRob Hoelz <rob@hoelz.ro>2013-09-04 11:41:42 +0200
committerRob Hoelz <rob@hoelz.ro>2013-09-04 11:41:42 +0200
commit57e0ac7e95a55ede7408a36dc7524649bbc8e4c2 (patch)
tree2ddc1204cd0b055aaff085c86cddf507895dc4da
parent6c53c05dcc25e74885411832839aa19ff46ee66a (diff)
Add another example of function call without parens
Function calls using a table literal as its sole parameter may also omit parentheses
-rw-r--r--lua.html.markdown4
1 files changed, 4 insertions, 0 deletions
diff --git a/lua.html.markdown b/lua.html.markdown
index 35d68e9b..9f9fd77b 100644
--- a/lua.html.markdown
+++ b/lua.html.markdown
@@ -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.