Lua Trivia

lua-users home
wiki

Difference (from revision 3 to current revision) (no other diffs)

Changed: 3,12c3
given a.b defined in terms of:

function(arg) print(arg) end

what would you expect the following to print?


a.b(a)
a:b()

a:b(c) causes a Lua function to be called. What arguments are passed to that function?

Question A

a:b(c) causes a Lua function to be called. What arguments are passed to that function?

Question B

What does the following code print, and why?
a = 2
b = 3
c = a-- * b++
print(a, b, c)
LuaTriviaAnswers


RecentChanges · preferences
edit · history
Last edited October 25, 2008 8:17 pm GMT (diff)