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

  • Home
  • SEARCH
  • 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 5952825
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T17:44:13+00:00 2026-05-22T17:44:13+00:00

For an object it is NSLog(@some object %@, someObject); For decimal it is: NSLog(@some

  • 0

For an object it is

NSLog(@"some object %@", someObject);  

For decimal it is:

NSLog(@"some object %d", 2.33);  

What is it for a bool?

  • 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-05-22T17:44:14+00:00Added an answer on May 22, 2026 at 5:44 pm

    Treat it like an int:

    NSlog(@"%d",yourBool)
    

    … outputs 1 for YES and 0 for NO

    If you want to get a YES/NO output use:

    NSLog(@"%@", (yourBool ? @"YES" : @"NO"));
    

    The reason, copy-pasted from objc.h:

    #define YES             (BOOL)1
    #define NO              (BOOL)0
    

    PS: For decimals (floats) it’s not %d…. its:

    NSLog(@"%f",2.33);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

When I send an object to NSLog, I get a string with three attributes.
Object slicing is some thing that object looses some of its attributes or functions
Am having some trouble hooking up instance variables in the visual object editor using
I declared a nsmutablearray and assign some object but when retrieving object it gives
Error in NSLog: *** -[NSThread initWithTarget:selector:object:]: target does not implement selector (*** -[Document myTcpClient])
The Imagepair object is a member variable of some other class.. I want its
Suppose I have an object containing some data. How can I see that data
I want to check if an object has some count or not Here is
these is some code from my project.. for (index=0; index<[feed count]; index++) { //NSLog(@........%@,[feed
I have experience with object-oriented programming however this situation is unfamiliar for some reason.

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.