• 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: returning value in a function argument
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: returning value in a function argument


  • Subject: Re: returning value in a function argument
  • From: Scott Ellsworth <email@hidden>
  • Date: Wed, 17 May 2006 20:36:04 -0700


On May 17, 2006, at 6:37 PM, Sherm Pendley wrote:

I don't know why so many folks are suggesting you return an array instead. Return by reference is a perfectly cromulent pattern, and it's been used for decades to work around C's insistence on a single return value. Far from discouraging it, Apple is adopting it all over the place with NSError objects.

Because he originally asked for two strings to be returned, without being clear which two strings those would be.


I would likely have had it return the infostring, since the caller already has the string passed in.

Scott
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >returning value in a function argument (From: Angelo Chen <email@hidden>)
 >Re: returning value in a function argument (From: Sherm Pendley <email@hidden>)

  • Prev by Date: Re: What's so special about NSString literals? (RE: memory management)
  • Next by Date: RE: Help with an old problem - Solved
  • Previous by thread: Re: returning value in a function argument
  • Next by thread: Re: returning value in a function argument
  • Index(es):
    • Date
    • Thread