ARM Technical Support Knowledge Articles


Applies to: C251 C Compiler



Why does the LIMITS.H from DK251 have different values from the PK51?


This was a mistake in the CA251 and DK251 V2.14 release. The correct LIMITS.H file may be downloaded from the Keil web site or you may copy the updated file below:


ANSI standard include file for C251 Version 2.
Copyright (c) 1988-1999 Keil Elektronik GmbH and Keil Software, Inc.
All rights reserved.


#define CHAR_BIT         8              /* Number of bits in any "char" */
#define CHAR_MAX         127            /* Max             "char" value */
#define CHAR_MIN       (-128)           /* Min             "char" value */
#define SCHAR_MAX        127            /* Max "signed"    "char" value */
#define SCHAR_MIN      (-128)           /* Min "signed"    "char" value */
#define UCHAR_MAX        255            /* Max "unsigned"  "char" value */
#define SHRT_MAX         32767          /* Max ("signed") "short" value */
#define SHRT_MIN       (-32768)         /* Min ("signed") "short" value */
#define USHRT_MAX        0xFFFF         /* Max "unsigned" "short" value */
#define INT_MAX          32767          /* Max ("signed")   "int" value */
#define INT_MIN        (-32768)         /* Min ("signed")   "int" value */
#define UINT_MAX         0xFFFF         /* Max "unsigned"   "int" value */
#define LONG_MAX         2147483647L    /* Max ("signed")  "long" value */
#define LONG_MIN   (-2147483647L-1L)    /* Min ("signed")  "long" value */
#define ULONG_MAX        0xFFFFFFFF     /* Max "unsigned"  "long" value */


Article last edited on: 2005-09-22 13:06:23

Rate this article

Disagree? Move your mouse over the bar and click

Did you find this article helpful? Yes No

How can we improve this article?

Link to this article
Copyright © 2011 ARM Limited. All rights reserved. External (Open), Non-Confidential