[DGD] varargs int ...

Michael McKiel crashnbrn71 at yahoo.ca
Sat Feb 21 09:04:16 CET 2004


Is it possible to test if a varargs int parameter was passed to a given
function or not?
I was playing around with a strstr() function, and seems I want to make it
work differently if the 2nd int variable wasn't passed ie:
string strstr(string str, int start, varargs int end) {

if I don't pass it 'end' then the function should assume end = strlen(str)-1
if I pass it end == 0, then it should return a nil string, since it would be
a zero length string.
But it seems all I can test for is !end
and that is true if I don't pass an end variable, and IF I pass it 0...

So what am I missing?


______________________________________________________________________ 
Post your free ad now! http://personals.yahoo.ca
_________________________________________________________________
List config page:  http://list.imaginary.com/mailman/listinfo/dgd



More information about the DGD mailing list