| |||||
Technical Support On-Line Manuals Cx51 User's Guide | Simple MacrosA simple macro is merely an abbreviation for a fragment of code. It is often called a manifest constant because it defines a name for a constant value. Macros must be defined using the #define directive before they can be used. For example: #define LEN 128 defines a macro named LEN. When LEN is used in your program (or in preprocessor directives) it is replaced with the text 128. So, a C statement like char buffer[LEN]; is expanded by the preprocessor into char buffer[128]; and is subsequently compiled by the compiler. Note
| ||||
| |||||