Is there a c language reference in Xcode docs?

Discussion in 'iOS Programming' started by deacLL, Mar 7, 2013.

  1. deacLL macrumors newbie

    Joined:
    Apr 2, 2011
    #1
    New to Xcode and love the handy documentation for Objective C, especially since I'm just learning it. But at times I need to check C syntax and math library calls, etc.

    Is there a C language reference in Xcode docs?
     
  2. xArtx macrumors 6502a

    Joined:
    Mar 30, 2012
    #2
    Not that I've seen, but I've not found anything missing either.
    Everything found on C specific forums/docs has applied so far.
     
  3. ArtOfWarfare macrumors 604

    ArtOfWarfare

    Joined:
    Nov 26, 2007
    #3
    I tried a few standard C functions and they all showed up in the Xcode docs browser just fine. It looks like they're apart of the OS X Man Pages.
     
  4. deacLL thread starter macrumors newbie

    Joined:
    Apr 2, 2011
    #4
    I was hoping for a complete C Reference on-line

    Thanks much for the comments. I see some C in the Xcode docs such a search for "cos", etc., but haven't found things like "switch" syntax (which I tend to forget. ;-) ).

    I found a good start at http://www.learnconline.com/ which has a lot of simple stuff.

    I was hoping for a complete C Reference on-line or on the computer as an app or perhaps an ebook such as Harbison & Steele I'd be willing to buy. I may just buy the hard copy. ;-) Thanks.
     
  5. ConCat macrumors 6502a

    ConCat

    Joined:
    Jul 27, 2012
    Location:
    In an ethereal plane of existence.
    #5
    This is correct. The C API docs are part of the OS X man pages. You can even try it:
    Code:
    man 3 printf
    There are two printfs in the manpages, one for shell scripting and one for C.
     
  6. deacLL thread starter macrumors newbie

    Joined:
    Apr 2, 2011
    #6
    OS X Man Pages

    ConCat, Thanks, I did pass over ArtOfWarfare's mention of the OS X Man Pages and forgot to revisit it.

    Is there a pdf or graphical viewer of it or are we talking about Terminal? Terminal command line would be okay - I did try "man 3 printf" which got no hit but "man printf" did, but I wonder if that's a bash result.

    Sorry, I'm just learning the Mac environment, and thanks for your patience and help.

    ----------

    I suspect I need to change my MANPATH since it is currently empty and "man 3" returns no result.

    Can you tell me what to set it to or how I can find that out?

    thanks again,
    deac
     
  7. ConCat, Mar 8, 2013
    Last edited: Mar 8, 2013

    ConCat macrumors 6502a

    ConCat

    Joined:
    Jul 27, 2012
    Location:
    In an ethereal plane of existence.
    #7
    I was just using that as an example. My setup so heavily customized, it's possible that man 3 printf wont work for you for some reason, don't know. Xcode does have access to these man pages though. Xcode>Window Menu>Organizer>Documentation>Search for "printf" or whatever other C function you're curious about. Alt-clicking works too.

    I included a screenshot of what you should see.
     

    Attached Files:

  8. Duncan C macrumors 6502a

    Duncan C

    Joined:
    Jan 21, 2008
    Location:
    Northern Virginia
    #8
    The standard library functions and unix functions are available as man pages in the Xcode docs. I don't think there is any documentation on the core C language however (things like switch statements, the modulo operator, etc.) That's what the K&R C book is for. Everybody who ever writes a line of C should have that book on their shelf.
     

Share This Page