The
tMS34010
C Language
4.3.1
Deri~ed
Types
K&R
2.6
TMS34010
C allows any type declaration to have up to six derived types.
Constructions such
as
"pointer
to",
"array of", and
"function
returning" can
be combined and
applied only this number
of
times.
For
example:
int
(*
(*n
l]
l]
)
()
) ( ) ;
translates
as
"an array
of
arrays
of
pointers to functions returning pointers
to
functions returning integers."
It
has six derived types, the maximum allowed.
Structures, unions, and enumerations
are
not
considered derived types
for
the
purposes
of
these limits.
Also,
the derived type cannot contain more than three array derivations. Note
that each dimension in a
multi-dimensional array
is
a separate array derivation;
thus, arrays
are
limited to three dimensions in any type definition. However,
types can be combined
to
produce any dimensioned array.
For
example, the
following
construction declares x
as
a four-dimensional ar-
ray:
typedef
int
dim2l]
l];
dim2
xl]
l];
Table 4-1 summarizes TMS3401 0 C data types:
char
unsigned char
short
unsigned short
int
unsigned
int
long
unsigned long
pointers
float
double
enum
Table
4-1.
TMS34010
C
Data
Sizes
8 bits, signed ASCII
8 bits, ASCII
16
bits
16
bits
32 bits
32 bits
32 bits
32
bits
32 bits
32
bits range: + -5.88 x 1
O(
-39)
through
+-1.70
x
10
38
64
bits range: + -1.11 x
1Q(
-308)
through
+ -8.99 x
10
308
1-32
bits - see Section 4.7.4
4-3