Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: ObjC Method naming



Scott wrote:

> ... And when I declare a method, do I HAVE to declare it with
> parameter names or can I leave them out?
>
> Ex.
> - (void) setWidth:(float) w height:(float) h
>
> Rock on!
> Scott
>
> ...

Actually, upon rereading this question... If you mean whether you can leave
out the logical parameters when using it like a prototype (such as in the
interface file), then the answer is yes, you can use

- (void) setWidth:(float) height:(float);

as a prototype for the method.

Again, I hope this helps.

David email@hidden


References: 
 >Re: ObjC Method naming (From: Scott <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.