• 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: pointer value into floating point value???HELP???
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: pointer value into floating point value???HELP???


  • Subject: RE: pointer value into floating point value???HELP???
  • From: "Jonathan E. Jackel" <email@hidden>
  • Date: Thu, 28 Aug 2003 11:10:51 -0400

> On Thursday, August 28, 2003, at 02:54 pm, Jonathan E. Jackel wrote:
>
> > On the other hand, if we have the slightest doubt about whether there
> > is
> > such an object in the dictionary we should do something like this:
> >
> > timerValue = [dictws1 objectForKey: @"R"];
> > ws1R = timerValue ? [timerValue intValue] : 0;
>
> No need for that; messages sent to nil will return zero anyway.
>
> Kind regards,
>
> Alastair

"The Objective C Programming Language" says:

"A message to nil also is valid, as long as the message returns an object;
if it does, a message sent to nil will return nil. If the message sent to
nil returns anything other than an object, the return value is undefined."

http://developer.apple.com/documentation/Cocoa/Conceptual/ObjectiveC/3objc_l
anguage_overview/chapter_3_section_3.html

So you have no idea what you are getting if you ask nil for an integer.

Jonathan.
_______________________________________________
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: pointer value into floating point value???HELP??? (From: "Alastair J.Houghton" <email@hidden>)

  • Prev by Date: Re: pcap programming
  • Next by Date: Re: Sorry, should have said iconcomposer
  • Previous by thread: Re: pointer value into floating point value???HELP???
  • Next by thread: Re: pointer value into floating point value???HELP???
  • Index(es):
    • Date
    • Thread