Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8671617
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T18:59:32+00:00 2026-06-12T18:59:32+00:00

i am actually debugging my iOS Application: i want to test if a variable

  • 0

i am actually debugging my iOS Application: i want to test if a variable is null or not:

Stupid question huh !

if (var !=nil) { doSomeWork ; }

So if the variable var is equal to nil and we want to print this result in the debugger area we will have something like that:

2012-10-12 21:33:01.553 Application’s Name [892:13d03] (null)

This is cool, but indeed when i try to print the variable content in the debugger area, it has been showing :

2012-10-12 21:33:01.553 Application’s Name [892:13d03] < null >

Can you tell me guys what is the difference between this two kinds of null, and how can i test if the second one is equal to nil.

Thanks in advance

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T18:59:33+00:00Added an answer on June 12, 2026 at 6:59 pm

    The second output, <null>, comes from the NSNull singleton. This is a class called NSNull that has a class method +null that returns the same singleton instance of NSNull every time. The primary purpose of this class it to be able to act as a stand-in for nil in places where you can’t put nil, such as in collections. For example, JSON libraries typically return NSNull when the JSON includes null.

    You can test for this simply by asking if it’s == to [NSNull null] (since it’s a singleton), or possibly if [obj isKindOfClass:[NSNull null]]. You could use [obj isEqual:[NSNull null]] if you like. You could even ask if it’s == kCFNull if you want, since CFNull and NSNull are toll-free bridged. Whatever style you want is up to you.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm considering creating a simple remote debugging application for Javascript. Actually, I want to
I get the error changes not allowed when unmanaged debugging is enabled Actually I
I am actually debugging an application for IE8 (after IE6, IE7 now IE8). I
Actually I am developing one application in that when application run first time it
Actually i want that, suppose i have a colorcode #FF3366. How can i examine
Actually ,i am working on a livechat application its works fine.This application is tabbed
I am debugging some code, and would like to throw an error without actually
While debugging an F# application, I would like to be able to invoke an
I've enabled iterator debugging in an application by defining _HAS_ITERATOR_DEBUGGING = 1 I was
While debugging an application earlier, I noticed in Web Inspector that it appears a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.