You copied the Doc URL to your clipboard.

Limits for integral numbers

Table 40 gives the ranges for integral numbers in ARM C and C++. The Endpoint 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 Further reading of Migration and Compatibility.

Table 40. Integer ranges
ConstantMeaningValueHex value
CHAR_MAXMaximum value of char2550xFF
CHAR_MINMinimum value of char00x00
SCHAR_MAXMaximum value of signed char1270x7F
SCHAR_MINMinimum value of signed char-1280x80
UCHAR_MAXMaximum value of unsigned char2550xFF
SHRT_MAXMaximum value of short32 7670x7FFF
SHRT_MINMinimum value of short-32 7680x8000
USHRT_MAXMaximum value of unsigned short65 5350xFFFF
INT_MAXMaximum value of int2 147 483 6470x7FFFFFFF
INT_MINMinimum value of int-2 147 483 6480x80000000
LONG_MAXMaximum value of long2 147 483 6470x7FFFFFFF
LONG_MINMinimum value of long-2 147 483 6480x80000000
ULONG_MAXMaximum value of unsigned long4 294 967 2950xFFFFFFFF
LLONG_MAXMaximum value of long long 9.2E+180x7FFFFFFF FFFFFFFF
LLONG_MINMinimum value of long long-9.2E+180x80000000 00000000
ULLONG_MAXMaximum value of unsigned long long1.8E+190xFFFFFFFF FFFFFFFF

Was this page helpful? Yes No