Re: NSScanner reads the correct number but the number isn't added to an array
Re: NSScanner reads the correct number but the number isn't added to an array
- Subject: Re: NSScanner reads the correct number but the number isn't added to an array
- From: j o a r <email@hidden>
- Date: Sun, 14 Dec 2003 18:53:01 +0100
On 2003-12-14, at 18.21, Philip Riggs wrote:
>
NSLog(@"Number %d :: %f", counter, [numberArray
>
objectAtIndex:counter]);
<snip>
>
Why doesn't numberArray add the correct number?
You're just not printing it correctly. Try:
NSLog(@"Number %d :: %@", counter, [numberArray objectAtIndex:
counter]);
..as you're trying to print the description of the NSNumber instance
in the array, and not it's floating point value.
Alternatively:
NSLog(@"Number %d :: %f", counter, [[numberArray objectAtIndex:
counter] doubleValue]);
j o a r
[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.