lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Hello,

I know that the three dots notation '...' can be used in function definition to mean variable arguments. My question is: Is it legal to have the three dots _expression_ as an argument to a function call?

From the specs, it's not listed as one of the options. However, the Lua compiler doesn't throw any errors.

Here is an example:

function my_function(v)
  print(v)
end

my_function(...)