about #pragma mark

Discussion in 'Mac Programming' started by Howiieque, Feb 27, 2009.

  1. macrumors regular

    Joined:
    Feb 1, 2009
    #1
    why do we use this directive? what can it do?
     
  2. macrumors newbie

    Joined:
    Jan 11, 2005
    #2
    I think all it does is make a special comment which Xcode adds to the quick jump list thing at the top of an xcode code view window. Immediately underneath the title bar there is a narrow bar with a dropdown list of every class and method that's in the current file. When you pragma mark a line it will also show up on this list so that you can quickly jump to that line from anywhere else in the file. It is useful for defining major sections of code.
     
  3. macrumors 68020

    Gelfin

    Joined:
    Sep 18, 2001
    Location:
    San Francisco, CA
    #3
    The #pragma directive is a standard way of adding nonstandard extensions to the C preprocessor as a way of controlling the operation of the compiler. What it allows you to do is specific to whatever compiler you're using.
     
  4. thread starter macrumors regular

    Joined:
    Feb 1, 2009
    #4
    thank you. both this two answers are useful.:)
     

Share This Page