17.02.2015 Views

CCS C Compiler Manual PCB / PCM / PCH

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

PreProcessor<br />

void TimerTask(void)<br />

{<br />

TimerFunc1();<br />

TimerFunc2();<br />

TimerFunc3();<br />

}<br />

/*<br />

This source will be compiled into a relocatable object, but the object this is<br />

being linked to can only see TimerTask()<br />

*/<br />

Example None<br />

Files:<br />

See Also: #IMPORT, #MODULE, Invoking the Command Line <strong>Compiler</strong>, Multiple<br />

Compilation Unit<br />

__file__<br />

Syntax:<br />

Elements:<br />

Purpose:<br />

Examples:<br />

Example<br />

Files:<br />

Also See:<br />

__FILE__<br />

None<br />

The pre-processor identifier is replaced at compile time with<br />

the file path and the filename of the file being compiled.<br />

if(index>MAX_ENTRIES)<br />

printf("Too many entries, source file: "<br />

__FILE__ " at line " __LINE__ "\r\n");<br />

assert.h<br />

_ _ line_ _<br />

__filename__<br />

Syntax:<br />

Elements:<br />

Purpose:<br />

Examples:<br />

Example Files:<br />

Also See:<br />

__FILENAME__<br />

None<br />

The pre-processor identifier is replaced at compile time with the<br />

filename of the file being compiled.<br />

if(index>MAX_ENTRIES)<br />

printf("Too many entries, source file: "<br />

__FILENAME__ " at line " __LINE__ "\r\n");<br />

None<br />

_ _ line_ _<br />

105

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!