Re: Thanks: Newbie: No Problems, Program compiles and works, but it has warnings
Re: Thanks: Newbie: No Problems, Program compiles and works, but it has warnings
- Subject: Re: Thanks: Newbie: No Problems, Program compiles and works, but it has warnings
- From: Laurent Daudelin <email@hidden>
- Date: Thu, 06 Nov 2003 22:01:40 -0500
on 11/6/03 9:28 PM, George Greene at email@hidden wrote:
>
Thanks, I added:
>
>
NSString *ltob(unsigned long val);
>
>
to the Controller.h file. It worked. All warnings are gone.
>
>
Question: When do you put - (minus) in front of function header?
>
>
I entered:
>
>
- NSString *ltob(unsigned long val);
>
>
and got a lot of errors.
>
>
The - is only used for functions for classes?
For a method, a '-' usually means an instance method, while the '+' means a
class method.
Now, when you write:
NSString *ltob(unsigned long val);
this usually means a C function, not a method. To transform the above
function into an Objective-C method, the syntax is:
- (NSString *)ltob:(unsigned long)val;
-Laurent.
--
============================================================================
Laurent Daudelin AIM/iChat: LaurentDaudelin <
http://nemesys.dyndns.org>
Logiciels Nemesys Software
mailto:email@hidden
elder days n.: The heroic age of hackerdom (roughly, pre-1980); the era of
the PDP-10, TECO, ITS, and the ARPANET. This term has been rather
consciously adopted from J. R. R. Tolkien's fantasy epic "The Lord of the
Rings". Compare Iron Age; see also elvish and Great Worm.
_______________________________________________
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.