C– – Compiler
5-42
5.9.4
C– – Directives
C– – has a limited number of directives and some additional directives not
found in ANSI C compilers. The following directives are recognized by the
compiler.
5.9.4.1
#define
This directive is used to introduce 2 types of macros, in typical C fashion:
Without Arguments:
defines a replacement string for a given string
Example:
#define PI 3.1415926535
Every occurrence of the token PI will henceforth be replaced with the string
3.1415926535.
If there is no replacement string, the given string is deemed
defined: this can
be used in conjunction with the #ifdef / #ifndef directives. It is also possible
to
undefine a macro with the #undefine directive.
With Arguments:
The macro name must be immediately followed by a pair of parenthesis,
which introduces the arguments. This is completely compatible with the usual
C definition.
Example:
#define modulo(i,j) (i%j)
Every occurrence of the word modulo followed by an expression in
parentheses will be replaced by (i%j), where i is the first argument in the
parenthesis, and j the second argument. modulo((a*b),c) will thus be replaced
by ((a*b)%c).
5.9.4.2
#undefine
The string following this directive is removed from the list of macros. There is
no warning if the string is not found in the macro list.
Summary of Contents for MSP50C614
Page 1: ...MSP50C614 Mixed Signal Processor User s Guide SPSU014 January 2000 Printed on Recycled Paper ...
Page 6: ...vi ...
Page 92: ...3 22 ...
Page 300: ...Instruction Set Summay 4 208 Assembly Language Instructions ...
Page 314: ...Software Emulator 5 14 Figure 5 13 Project Menu Figure 5 14 Project Open Dialog ...
Page 325: ...Software Emulator 5 25 Code Development Tools Figure 5 25 EPROM Programming Dialog ...
Page 331: ...Software Emulator 5 31 Code Development Tools Figure 5 31 Context Sensitive Help System ...
Page 368: ...5 68 ...
Page 394: ...7 12 ...
Page 402: ...A 8 ...
Page 412: ...Packaging B 10 ...