lua-users home
lua-l archive

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


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
>

-Patrick Donnelly

"One of the lessons of history is that nothing is often a good thing to do and always a clever thing to say."

-Will Durant