• 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: NSString intValue
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSString intValue


  • Subject: Re: NSString intValue
  • From: Andrew Pinski <email@hidden>
  • Date: Tue, 12 Aug 2003 10:54:58 -0400

On Tuesday, Aug 12, 2003, at 10:44 US/Eastern, Andreas Nfsby Rasmussen wrote:

Hi,

Something quite trivial which is starting to annoy me. I have a NSString containing for example "1234", which I want to turn into an int.

I fail to see why the following doesn't work but it always crashes with ... exited due to signal 10 (SIGBUS)


NSString *test = @"1234";

NSLog(@"test: %@", [test intValue]);

Try NSLog(@"test: %d", [test intValue]); instead as -[ intValue] returns an int not an object.

Andrew
_______________________________________________
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: 
 >NSString intValue (From: Andreas Næsby Rasmussen <email@hidden>)

  • Prev by Date: NSString intValue
  • Next by Date: Re: NSString intValue
  • Previous by thread: NSString intValue
  • Next by thread: Re: NSString intValue
  • Index(es):
    • Date
    • Thread