#pragma mark: Entry in CodeWarrior IDE Function List

Scope

Line

Syntax

#pragma mark {any text - no quote marks needed}

Synonym

None

Arguments

None

Default

None

Description

This pragma adds an entry into the function list of the CodeWarrior IDE. It also helps to introduce faster code lookups by providing a menu entry which directly jumps to a code position. With the special #pragma mark -, a separator line is inserted.

Note: The compiler does not actually handle this pragma. The compiler ignores this pragma. The CodeWarrior IDE scans opened source files for this pragma. It is not necessary to recompile a file when this pragma is changed. The IDE updates its menus instantly.
Example

For the example in the following listing the pragma accesses declarations and definitions.

Listing: Using the MARK pragma


#pragma mark local function declarations
static void inc_counter(void);

static void inc_ref(void);

#pragma mark local variable definitions

static int counter;

static int ref;

#pragma mark -

static void inc_counter(void) {

  counter++;

}

static void inc_ref(void) {

  ref++;

}