Section 1: General Information
29
TI
-
89 / TI
-
92 Plus Sierra C Assembler Reference Manual Not for Distribution
Beta Version February 2, 2001
Mnemonic Value Type
DT_NON 0 No derived type
DT_PTR 1 Pointer
DT_FCN 2 Function
DT_ARRAY 3 Array
Table 1.23: Derived Types
The following two examples demonstrate the interpretation of the symbol table
entry type field.
int **func1()
In the above example, func1 is a function that returns a pointer to a pointer to an
integer. The fundamental type of func1 is 4 (integer), the first derived type is 2
(function), the second derived type is 1 (pointer) and the third derived type is also
1 (pointer). Combining the information into a single word (01 01 10 0100), as
previously described, the hexadecimal representation of the value in the type
field is 0x164.
short (*(*pfunc[2][3])())[4]
In this example, pfunc is a two-dimensional array of pointers to a function that
returns a pointer to an array of short integers. The fundamental type of pfunc is
3 (short integer), the first derived type is 3 (array), the second derived type is 3
(array), the third derived type is 1 (pointer, the fourth derived type is 2 (function),
the fifth derived type is 1 (pointer) and the sixth derived type is again 3 (array).
Combining the information into a single word (11 01 10 01 11 11 0011), as
previously described, the hexadecimal representation of the value in the type
field is 0xD9F3.