EasyManua.ls Logo

Texas Instruments TI-89 - Macro Examples

Texas Instruments TI-89
334 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
98
Section 2: Compiler
TI
-
89 / TI
-
92 Plus Sierra C Assembler Reference Manual
Not for Distribution
Beta Version February 2, 2001
2.16.5. Macro Examples
The following example illustrates the rules for redefinition, tokenization, macro
replacement, and replacement list reexamination:
#define x 3
#define q x
#define f(i) f(q + (i->m))
#define b b + c
#undef x
#define x 5
#define z(a) a
#define g f
#define j )
#define d +
#define e +
#define r(a, b) (a)(b)
#define s(a, b) a(b)
#define y g(y)
r(f, g)
s(f, q)
g(36j
#undef q
#define q d
f(b + c)
f(y)
35d+12
35e+12
/* Results After Preprocessing */
(f)(5)
f(5 + (4->m))
f(36)
f(+ + (b + c + c->m))
f(+ + (f(y)->m))
35++12
35e+12

Table of Contents

Other manuals for Texas Instruments TI-89

Related product manuals