EasyManuals Logo
Home>Texas Instruments>Calculator>TI-89

Texas Instruments TI-89 Software Guide

Texas Instruments TI-89
334 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #111 background imageLoading...
Page #111 background image
Section 2: Compiler
99
TI
-
89 / TI
-
92 Plus Sierra C Assembler Reference Manual
Not for Distribution
Beta Version February 2, 2001
The following example illustrates the rules for concatenating tokens:
#define paste(a,b) a ## b
#define opnd_info(n) op##n##_info(size##n(),type##n())
#define HITHERE hello, world!
paste(HI,THERE)
opnd_info(2)
/* Results After Preprocessing */
hello, world!
op2_info(size2(),type2())
The following example illustrates the rules for creating string literals:
#define stringize(s) # s
#define expand(s) stringize(s)
#define max(a,b) ((a) > (b) ? (a) : (b))
#define show_macro(m) printf(#m " becomes " expand(m)"\n")
show_macro(max(a,b))
/* Results After Preprocessing */
printf("max(a,b)" " becomes " "((a) > (b) ? (a) : (b))""\n")
After string concatenation, the above result appears as follows:
printf("max(a,b) becomes ((a) > (b) ? (a) : (b))\n")
Space around the ' # ' and ' ## ' operators is optional.
2.16.6. Line and Name Control
A preprocessing directive of the following form causes the compiler to behave as
if the line number of the next source line is the number specified by the decimal
constant in the directive:
#line decimal_constant
A preprocessing directive of the following form sets the line number as specified
above and changes the presumed name of the source file to be the filename
shown in the string literal:
#line decimal_constant "file_name"
Macro names among the preprocessor tokens following the
#line
directive are
processed the same as any other macro names in the file. The directive that
results after macro substitution must match one of the two previous forms and is
processed accordingly.

Table of Contents

Other manuals for Texas Instruments TI-89

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Texas Instruments TI-89 and is the answer not in the manual?

Texas Instruments TI-89 Specifications

General IconGeneral
Display size (HxV)100 x 160 mm
Memory type639K FLASH ROM, 188K bytes RAM
Compatible operating systemsOperating System 2.09
Battery typeAAA

Related product manuals