variable function argument to return
[
Date Prev][
Date Next][
Thread Prev][
Thread Next]
[
Date Index]
[
Thread Index]
- Subject: variable function argument to return
- From: Philipp Kraus <philipp.kraus@...>
- Date: 2014年9月26日 12:32:12 +0200
Hello,
I have got a Lua function which is filled by the C API.
function myFunction( ... )
local args = {...}
-- do something with args
return args ?
end
The args is a table, but I would like to return the arguments in an
equal way in which the args are put to the function. My fuction
myFunction should be used in this way: a,b,c = myFunction( 1, "test",
true ) or
a,b = myFunction( 1, 2 )
How can I do this on the return line?
Thanks a lot
Phil