no fixed variable parameter preceding a variable ... parameter?
no fixed variable parameter preceding a variable ... parameter?
- Subject: no fixed variable parameter preceding a variable ... parameter?
- From: Ben Dougall <email@hidden>
- Date: Sat, 25 Oct 2003 18:47:53 +0100
is there anyway to declare a method to take a variable number of
arguments, *without* an initial fixed argument, like this:
- (void)takeTheseObjects: ...
{
// (don't worry about this part, it's just the above method
// name/parameter line that i'd like to know about)
}
when i try and compile a method that has that declaration line the
compiler says:
TestClass.h:16: illegal keyword selector, missing `identifier' after `:'
In file included from main.m:3:
TestClass.h:16: parse error before '...' token
so i tried:
- (void)takeTheseObjects:(id)...
which gave different errors.
this compiles fine, because of the initial fixed parameter:
- (void)takeTheseObjects:(unsigned)anything, ...
{
// .....
// .....
}
i've tried a number of combinations of things to try and achieve no
fixed variables but no good. anyone know of a way?
thanks, ben.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.