• 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: What init declaration class needs?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: What init declaration class needs?


  • Subject: Re: What init declaration class needs?
  • From: Óscar Morales Vivó <email@hidden>
  • Date: Fri, 13 Feb 2004 16:29:54 +0100

I usually write

if((self = [super init]) != nil)...

as I find the explicit comparison more readable. Obviously YMMV.

On 13 Feb 2004, at 16:20, Sherm Pendley wrote:

On Feb 13, 2004, at 10:04 AM, Clark Cox wrote:

if(self = [super init])

It's worth noting that GCC 3.3, if -Wall is used, will emit a warning when assignments are used in conditional statements. To silence the warning, add a second set of paranthesis like this:

if ((self = [super init]))

sherm--
_______________________________________________
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.
_______________________________________________
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: 
 >What init declaration class needs? (From: Roberto Sobachi <email@hidden>)
 >Re: What init declaration class needs? (From: Clark Cox <email@hidden>)
 >Re: What init declaration class needs? (From: Sherm Pendley <email@hidden>)

  • Prev by Date: Re: What init declaration class needs?
  • Next by Date: Downloading a file from another mac
  • Previous by thread: Re: What init declaration class needs?
  • Next by thread: Re: What init declaration class needs?
  • Index(es):
    • Date
    • Thread