variable argument list
Posted on 2004-09-14
I want my function to take in a varialbe number of arguments,
so for example if i had just one argument I would call it by
or if I had 2 arguments then I'd call
function(2, arg1, arg2)
or 3 then
function(3, arg1, arg2, arg3)
so I would have to have something like a switch statement to handle these variable cases
but what if I could possibly have 200 arguments
then how would I handle this?
i.e., how would I have a variable arugment list that doesnt require knowing the number of arguments in case the number of arguments could be from 1 to a million!