Keil™, An ARM® Company

C166 User's Guide

DEFINE Compiler Directive

Abbreviation DF
Arguments One or more names (in accordance with the naming conventions of the C language) separated by commas. An optional value may be assigned to each name.
Default None.
µVision Options — C166 — Define.
Description 

The DEFINE directive defines preprocessor symbols on the compiler command line. This is equivalent to using the #define directive in your program source code. You may use the #if, #ifdef, and #ifndef preprocessor directives to query names defined with the DEFINE directive.

Defined names are copied exactly as they are entered and are case-sensitive. Each name may be assigned a value.

Note

  • The DEFINE directive may be specified only on the command line. Use the C preprocessor #define directive to define symbols inside a C source file.
  • The DEFINE directive may not be used to define preprocessor macros.
Example 
C166 SAMPLE.C DEFINE (check, NoExtRam)

C166 MYPROG.C DF (X1='1+5',iofunc='getkey ()')