about #pragma mark

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

  1. Howiieque macrumors regular

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

    Jan 11, 2005
    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. Gelfin macrumors 68020


    Sep 18, 2001
    Denver, CO
    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. Howiieque thread starter macrumors regular

    Feb 1, 2009

Share This Page