• 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: Why is "." a decimal number? (NSScanner question)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Why is "." a decimal number? (NSScanner question)


  • Subject: Re: Why is "." a decimal number? (NSScanner question)
  • From: Ondra Cada <email@hidden>
  • Date: Fri, 4 Jun 2004 23:25:22 +0200

Jim,

On 4.6.2004, at 21:38, Jim Rankin wrote:

> Why does NSScanner consider "." to be a decimal number? The following
> program:
> ...
> Does anyone ever write "." and expect it to be interpreted to mean "0"?

In a sense, yes. Many of us often write "10." for ten (to distinguish
it from an int), and many of us often write ".3" for three tenths.

I would say that, given the two facts above, the best of all
possibilities is indeed to treat "." a zero.
---
Ondra Hada
OCSoftware: email@hidden http://www.ocs.cz
private email@hidden http://www.ocs.cz/oc

[demime 0.98b removed an attachment of type application/pkcs7-signature which had a name of smime.p7s]
_______________________________________________
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.


  • Follow-Ups:
    • Re: Why is "." a decimal number? (NSScanner question)
      • From: Jim Rankin <email@hidden>
    • Re: Why is "." a decimal number? (NSScanner question)
      • From: Ondra Cada <email@hidden>
References: 
 >Why is "." a decimal number? (NSScanner question) (From: Jim Rankin <email@hidden>)

  • Prev by Date: Re: Project Builder and 10.1
  • Next by Date: NSXMLParser crashes
  • Previous by thread: Why is "." a decimal number? (NSScanner question)
  • Next by thread: Re: Why is "." a decimal number? (NSScanner question)
  • Index(es):
    • Date
    • Thread