• 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: Should a Method set NSError* to nil when No Error?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Should a Method set NSError* to nil when No Error?


  • Subject: Re: Should a Method set NSError* to nil when No Error?
  • From: Uli Kusterer <email@hidden>
  • Date: Sun, 20 Apr 2008 16:20:01 +0200

Am 20.04.2008 um 11:45 schrieb Jean-Daniel Dupas:
I greatly prefere the C99 way to do it. It prevents variables conflict if you have more than one loop in your method.

for (int idx = 0; idx < maxCount(); idx++) {

}


Yeah, I like that, when I can use it. It's just not always possible, and sometimes you want several loops to share a counter.

Besides, it wouldn't have illustrated the point I was trying to make, that I always initialize variables, even if I'll be smashing their value right thereafter. Maybe I should have gone with:

	BOOL	success = NO;

success = [[NSFileManager defaultManager] changeCurrentDirectoryPath: @"/"];

or whatever.

Cheers,
-- Uli Kusterer
"The Witnesses of TeachText are everywhere..."
http://www.zathras.de





_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Should a Method set NSError* to nil when No Error?
      • From: "Clark Cox" <email@hidden>
References: 
 >Should a Method set NSError* to nil when No Error? (From: Jerry Krinock <email@hidden>)
 >Re: Should a Method set NSError* to nil when No Error? (From: Uli Kusterer <email@hidden>)
 >Re: Should a Method set NSError* to nil when No Error? (From: Jean-Daniel Dupas <email@hidden>)

  • Prev by Date: Re: NSPopupButton Bindings
  • Next by Date: Re: NSPopupButton Bindings
  • Previous by thread: Re: Should a Method set NSError* to nil when No Error?
  • Next by thread: Re: Should a Method set NSError* to nil when No Error?
  • Index(es):
    • Date
    • Thread