lua-users home
lua-l archive

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



On 28-Jun-07, at 2:59 PM, Patrick Donnelly wrote:

Use this:

function printArgs(...)
  local t = {...};
  for i = 1, #t do
    print(t[i]);
  end;
end;



>printArgs(1, 2, nil, 5, nil, 7)
1
2
nil
5
nil
7
>

As mentioned in my other post in this thread, try this:

> printArgs(1, 2, nil, 5, nil, 7, nil)