• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Thanks: Newbie: No Problems, Program compiles and works, but it has warnings
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

References: 
 >Re: Thanks: Newbie: No Problems, Program compiles and works, but it has warnings (From: George Greene <email@hidden>)

  • Prev by Date: Newbie: another warning after adding Delegate Method to the Controller
  • Next by Date: Re: Help with Undo and MVC
  • Previous by thread: Re: Thanks: Newbie: No Problems, Program compiles and works, but it has warnings
  • Next by thread: Newbie: another warning after adding Delegate Method to the Controller
  • Index(es):
    • Date
    • Thread