Datasheet

Appendix C. The C Language
56
that long. Of course, this can have very unfortunate side effects. But C has great faith that you knew what
you were doing when you wrote that.
C.2. Identifiers
Variables and functions in C are assigned names called identifiers. ANSI C sets some minimum
requirements for identifiers, but also allows some implementation flexibility. As a general rule, XC16
makes maximum use of that flexibility.
An identifier is a sequence of letters and/or digits which must begin with a letter. The underbar (_)
character counts as a letter.[KandR] Identifiers may be of any length, and all characters are significant.
[MCP1] (The ANSI standard requires at least the first 31 characters be significant). Identifiers are case
sensitive.
C.3. Types, Operators and Expressions
C.3.1. Scalar types
There are two general categories of values within C; integer and floating point. Within those categories are
a number of different types. What those types actually mean is somewhat implementation dependent. For
example, int is an integer of the natural size for the target processor. long is an integer the same size
as int or longer, short the same size as int or shorter.
For XC16 the following are the integer types:[MCP1]
Table C.1. Integer Types
Type Bits Min Max
char 8 -128 127
signed char 8 -128 127
unsigned char 8 0 255
short 16 -32768 32767
signed short 16 -32768 32767
unsigned short 16 0 65536
int 16 -32768 32767
signed int 16 -32768 32767
unsigned int 16 0 65535
long 32 -2147483648 2147483647
signed long 32 -2147483648 2147483647
unsigned long 32 0 4294967296
long long 64 -9223372036854775808 9223372036854775807
signed long long 64 -9223372036854775808 9223372036854775807