• 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: Use of "min" and "max" functions
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Use of "min" and "max" functions


  • Subject: Re: Use of "min" and "max" functions
  • From: Scott Ribe <email@hidden>
  • Date: Fri, 18 May 2007 17:20:47 -0600
  • Thread-topic: Use of "min" and "max" functions

> Ok,   I see - I seemed to remember there also was some type of standard
> library they might be in,  but this is obviously the better choice.

There's the STL templates min & max. Just remember that "return a > b ? a :
b;" can evaluate the greater argument twice, so if you embed a call with
side effects...

--
Scott Ribe
email@hidden
http://www.killerbytes.com/
(303) 722-0567 voice


_______________________________________________

Cocoa-dev mailing list (email@hidden)

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

References: 
 >Re: Use of "min" and "max" functions (From: email@hidden)

  • Prev by Date: Accessing an NSArrayController in another NIB file
  • Next by Date: variadic function
  • Previous by thread: Re: Use of "min" and "max" functions
  • Next by thread: Re: Use of "min" and "max" functions
  • Index(es):
    • Date
    • Thread