You copied the Doc URL to your clipboard.

Limits for integral numbers

The following table gives the ranges for integral numbers in ARM C and C++.

The Value column of the table gives the numerical value of the range endpoint. The Hex value column gives the bit pattern (in hexadecimal) that is interpreted as this value by the ARM compiler. These constants are defined in the limits.h include file.

When entering a constant, choose the size and sign with care. Constants are interpreted differently in decimal and hexadecimal/octal. See the appropriate C or C++ standard, or any of the recommended C and C++ textbooks for more information, as described in the ARM Compiler Getting Started Guide.

Table 17-2 Integer ranges

Constant Meaning Value Hex value
CHAR_MAX Maximum value of char 255 0xFF
CHAR_MIN Minimum value of char 0 0x00
SCHAR_MAX Maximum value of signed char 127 0x7F
SCHAR_MIN Minimum value of signed char –128 0x80
UCHAR_MAX Maximum value of unsigned char 255 0xFF
SHRT_MAX Maximum value of short 32 767 0x7FFF
SHRT_MIN Minimum value of short –32 768 0x8000
USHRT_MAX Maximum value of unsigned short 65 535 0xFFFF
INT_MAX Maximum value of int 2 147 483 647 0x7FFFFFFF
INT_MIN Minimum value of int –2 147 483 648 0x80000000
LONG_MAX Maximum value of long 2 147 483 647 0x7FFFFFFF
LONG_MIN Minimum value of long –2 147 483 648 0x80000000
ULONG_MAX Maximum value of unsigned long 4 294 967 295 0xFFFFFFFF
LLONG_MAX Maximum value of long long 9.2E+18 0x7FFFFFFFFFFFFFFF
LLONG_MIN Minimum value of long long –9.2E+18 0x8000000000000000
ULLONG_MAX Maximum value of unsigned long long 1.8E+19 0xFFFFFFFFFFFFFFFF