3.8. Limits for integral numbers

The following table gives the ranges for integral numbers as implemented in ARM C and C++. The third column of the table gives the numerical value of the range endpoint. The right hand column gives the bit pattern (in hexadecimal) that would be interpreted as this value by the ARM compilers.

When entering constants, you must be careful about the size and sign of the quantity. Constants are interpreted differently in decimal and hexadecimal/octal. See the appropriate C or C++ standard, or any of the recommended textbooks on the C and C++ programming language for more details.

Table 3.12. Integer ranges

ConstantMeaningEnd-pointHex 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 short327670x7fff
SHRT_MINMinimum value of short–327680x8000
USHRT_MAXMaximum value of unsigned short655350xffff
INT_MAXMaximum value of int21474836470x7fffffff
INT_MINMinimum value of int–21474836480x80000000
LONG_MAXMaximum value of long21474836470x7fffffff
LONG_MINMinimum value of long–21474836480x80000000
ULONG_MAXMaximum value of unsigned long42949672950xffffffff
Copyright © 1997, 1998 ARM Limited. All rights reserved.ARM DUI 0041C