ARM Technical Support Knowledge Articles

SUPPORTED DATA TYPES

Applies to: C51 C Compiler

Answer


Information in this article applies to:


QUESTION

What data types are supported by the C51 compiler?

ANSWER

The following data types are supported by C51 Version 5 and later.

Data Type       Bits    Bytes   Value Range
------------------------------------------------------------------
bit             1               0 to 1
signed char     8       1       -128 to +127
unsigned char   8       1       0 to 255
enum            16      2       -32768 to +32767
signed short    16      2       -32768 to +32767
unsigned short  16      2       0 to 65535
signed int      16      2       -32768 to +32767
unsigned int    16      2       0 to 65535
signed long     32      4       -2147483648 to 2147483647
unsigned long   32      4       0 to 4294967295
float           32      4       +/-1.175494E-38 to +/-3.402823E+38
sbit            1               0 to 1
sfr             8       1       0 to 255
sfr16           16      2       0 to 65535

Article last edited on: 2000-08-14 00:00:00

Rate this article

[Bad]
|
|
[Good]
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