Re: Why is "." a decimal number? (NSScanner question)
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.