• 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
syntax question: question marks
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

syntax question: question marks


  • Subject: syntax question: question marks
  • From: <email@hidden>
  • Date: Sun, 24 Aug 2003 23:13:49 -0400 (EDT)

So I am trying to get into unit testing with OCUnit and am following this
stepwise article:

http://www.stepwise.com/Articles/Technical/2002-06-17.01.html

In the article they use this below accessor method which I kind of like
since it allows for a nice way to handle if the value was set to nil. I
know how it works but am looking for someone to help explain the syntax.
What does a question mark mean? How should I read this?

Thanks.

- (NSString *) firstName
{
return firstName != nil ? firstName : @"";
}

~ Mike
_______________________________________________
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: syntax question: question marks
      • From: Wade Tregaskis <email@hidden>
    • Re: syntax question: question marks
      • From: Chris Garaffa <email@hidden>
  • Prev by Date: "Borrowing" images from applications with *.rsrc files
  • Next by Date: Re: syntax question: question marks
  • Previous by thread: "Borrowing" images from applications with *.rsrc files
  • Next by thread: Re: syntax question: question marks
  • Index(es):
    • Date
    • Thread