I have seen someone declaring a method in Objective C like this:
- (FMResultSet *)executeQueryWithFormat:(NSString*)format, ...;
Can anyone tell me what does the dotted notation at the end of the method declaration represent here?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The
...represents a variable-length argument list, analogous to a variadic function in standard C. It indicates that the message can accept a variable number of arguments.Within the message implementation variadic arguments are handled just the same way as in a standard C function, except in Objective-C the argument list is typically
nilterminated. The same header filestdarg.his used, and the sameva_listtype and associated macros for manipulating the list.See this OS X Developer document for an example; and some standard C examples here.