• 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: Limiting a float
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Limiting a float


  • Subject: Re: Limiting a float
  • From: Michael Tsai <email@hidden>
  • Date: Thu, 28 Aug 2003 10:22:05 -0400

On Thursday, August 28, 2003, at 09:30 AM, M. Uli Kusterer wrote:

Use [NSString stringWithFormat: @"%f.2", myFloat] and pass that to the text field's setStringValue:. (The format string is from memory. Look up printf-style format strings in your ANSI reference if it doesn't work the way you want)

The format specifier needs to *end* with the f. One way to remember this is to think about how you would detect the end of the special % section if you were writing a format parser.

--Michael
_______________________________________________
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: Limiting a float (From: "M. Uli Kusterer" <email@hidden>)

  • Prev by Date: Re: Notification of Front Process Changed ?
  • Next by Date: Re: pointer value into floating point value???HELP???
  • Previous by thread: RE: Limiting a float
  • Next by thread: pointer value into floating point value???HELP???
  • Index(es):
    • Date
    • Thread