jason_mao 发表于 2006-12-8 09:27:27

马老师,在ICCAVR中BOOL类型量的定义是用的什么头文件?多谢拉

马老师,在ICCAVR中BOOL类型量的定义是用的什么头文件?多谢拉

machao 发表于 2007-3-10 00:17:40

以下是ICCAVR所支持的变量类型



TYPE        SIZE (bytes)        RANGE

unsigned char        1        0..255

signed char        1        -128..127

char (*)        1        0..255

unsigned short        2        0..65535

(signed) short        2        -32768..32767

unsigned int        2        0..65535

(signed) int        2        -32768..32767

pointer        2        N/A

unsigned long        4        0..4294967295

(signed) long        4        -2147483648..2147483647

float        4        +/-1.175e-38..3.40e+38

double        4        +/-1.175e-38..3.40e+38



(*) "char" is equivalent to "unsigned char"

floats and doubles are in IEEE standard 32-bit format with 8 bit exponent, 23-bit mantissa and 1 sign bit.

Bitfield types must be either signed or unsigned but they will be packed into the smallest space. For example:



struct {



unsigned a : 1, b : 1;



};



Size of this structure is only 1 byte. Bitfields are packed right to left.
页: [1]
查看完整版本: 马老师,在ICCAVR中BOOL类型量的定义是用的什么头文件?多谢拉