17.02.2015 Views

CCS C Compiler Manual PCB / PCM / PCH

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Structures & Unions<br />

typedef<br />

Named Registers<br />

Type Specifiers<br />

Basic Types<br />

Range<br />

Type-Specifier<br />

Size Unsigned Signed Digits<br />

N/A<br />

int1 1 bit number 0 to 1<br />

1/2<br />

int8 8 bit number 0 to 255<br />

int16 16 bit number 0 to 65535<br />

-128 to 127<br />

-32768 to 32767<br />

2-3<br />

4-5<br />

-2147483648 to 2147483647<br />

int32 32 bit number 0 to 4294967295<br />

9-10<br />

float32<br />

32 bit float -1.5 x 10 45 to 3.4 x 10 38 7-8<br />

C Standard Type<br />

short<br />

char<br />

int<br />

long<br />

long long<br />

float<br />

double<br />

Default Type<br />

int1<br />

unsigned int8<br />

int8<br />

int16<br />

int32<br />

float32<br />

N/A<br />

Note: All types, except float char , by default are un-signed; however, may be<br />

preceded by unsigned or signed (Except int64 may only be signed) . Short and long<br />

may have the keyword INT following them with no effect. Also see #TYPE to<br />

change the default size.<br />

SHORT INT1 is a special type used to generate very efficient code for bit operations<br />

and I/O. Arrays of bits (INT1 or SHORT ) in RAM are now supported. Pointers to<br />

bits are not permitted. The device header files contain defines for BYTE as an int8<br />

and BOOLEAN as an int1.<br />

Integers are stored in little endian format. The LSB is in the lowest address. Float<br />

formats are described in common questions.<br />

SEE ALSO: Declarations, Type Qualifiers, Enumerated Types, Structures & Unions,<br />

typedef, Named Registers<br />

28

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!