lots of args. (was Anyone Still Interested)
Quote from Forum Archives on February 7, 2010, 11:36 pmPosted by: artlythere <artlythere@...>
Thanks for trying, but ...That is why I am confused. This makes no sense to me.
Why is it not: -(void)messageWithLotsOfArgs:(int)a :(int)b :(int)c :
(int)d :(int)e;vs
> -(void)messageWithLotsOfArgs:(int)a secondArg:(int)b thirdArg:(int)
> c fourthArg:(int)d andTheLast:(int)e;And why is there not a firstArg?
This stuff befuddles the heck out of me. Why can't things be written
clearly, and intuitively asFn FunctionWithLotsOfArgs( int a, int b, int c, int d, int e)
and you know exactly what is what.
rc
On Feb 5, 2010, at 11:09 PM, Ross Tulloch wrote:
>
> Robert Covington wrote:
>
>> So, how in the world, would one create an 8 parameter monster like
>> I enjoy in FB at times, in Cocoa? How would you have to prototype
>> and define, what files to create and such?
>
> //
> // MyClass.h --- header file
> //
>
> #import
>
> @interface MyClass : NSObject {
> }
> -(void)messageWithLotsOfArgs:(int)a secondArg:(int)b thirdArg:(int)
> c fourthArg:(int)d andTheLast:(int)e;
> @end
>
> ////////////////// CUT HERE ////////////////
>
> //
> // MyClass.m -- implementation file .m
> //
>
> #import "MyClass.h"
>
> @implementation MyClass
>
> -(void)messageWithLotsOfArgs:(int)a secondArg:(int)b thirdArg:(int)
> c fourthArg:(int)d andTheLast:(int)e
> {
> printf("a = %d
> b = %d
> c = %d
> d = %d
> e = %d",a,b,c,d,e);
> }
>
> @end
>
> ////////////////// CUT HERE. HOW TO CALL: ////////////////
>
> MyClass* object = [[[MyClass alloc] init] autorelease];
> [object messageWithLotsOfArgs:1 secondArg:2 thirdArg:3 fourthArg:4
> andTheLast:5];
>
>
>
>
> Hope that helps,
> Ross.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
Posted by: artlythere <artlythere@...>
That is why I am confused. This makes no sense to me.
Why is it not: -(void)messageWithLotsOfArgs:(int)a :(int)b :(int)c :
(int)d :(int)e;
vs
> -(void)messageWithLotsOfArgs:(int)a secondArg:(int)b thirdArg:(int)
> c fourthArg:(int)d andTheLast:(int)e;
And why is there not a firstArg?
This stuff befuddles the heck out of me. Why can't things be written
clearly, and intuitively as
Fn FunctionWithLotsOfArgs( int a, int b, int c, int d, int e)
and you know exactly what is what.
rc
On Feb 5, 2010, at 11:09 PM, Ross Tulloch wrote:
>
> Robert Covington wrote:
>
>> So, how in the world, would one create an 8 parameter monster like
>> I enjoy in FB at times, in Cocoa? How would you have to prototype
>> and define, what files to create and such?
>
> //
> // MyClass.h --- header file
> //
>
> #import
>
> @interface MyClass : NSObject {
> }
> -(void)messageWithLotsOfArgs:(int)a secondArg:(int)b thirdArg:(int)
> c fourthArg:(int)d andTheLast:(int)e;
> @end
>
> ////////////////// CUT HERE ////////////////
>
> //
> // MyClass.m -- implementation file .m
> //
>
> #import "MyClass.h"
>
> @implementation MyClass
>
> -(void)messageWithLotsOfArgs:(int)a secondArg:(int)b thirdArg:(int)
> c fourthArg:(int)d andTheLast:(int)e
> {
> printf("a = %d
> b = %d
> c = %d
> d = %d
> e = %d",a,b,c,d,e);
> }
>
> @end
>
> ////////////////// CUT HERE. HOW TO CALL: ////////////////
>
> MyClass* object = [[[MyClass alloc] init] autorelease];
> [object messageWithLotsOfArgs:1 secondArg:2 thirdArg:3 fourthArg:4
> andTheLast:5];
>
>
>
>
> Hope that helps,
> Ross.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>