Chinaunix首页 | 论坛 | 博客
  • 博客访问: 616061
  • 博文数量: 201
  • 博客积分: 3076
  • 博客等级: 中校
  • 技术积分: 2333
  • 用 户 组: 普通用户
  • 注册时间: 2009-08-02 19:44
文章分类

全部博文(201)

文章存档

2010年(118)

2009年(83)

我的朋友

分类:

2010-04-19 14:12:24



Various platform-dependent constants proposed by ANSI

Constants

Length of a char variable in bits.
Maximal value which can be stored in a char variable.
Minimal value which can be stored in a char variable.
Maximal value which can be stored in an int variable.
Minimal value which can be stored in an int variable.
Maximal value which can be stored in a long int variable.
Minimal value which can be stored in a long int variable.
Maximal value which can be stored in a signed char variable.
Minimal value which can be stored in a signed char variable.
Maximal value which can be stored in a short int variable.
Minimal value which can be stored in a short int variable.
Maximal value which can be stored in an unsigned char variable.
Maximal value which can be stored in an unsigned int variable.
Maximal value which can be stored in an unsigned long int variable.
Maximal value which can be stored in an unsigned short variable.

Note: and may have different values depending on whether chars are signed or not. They are signed by default in TIGCC, but this may be changed using a compiler command-line switch. Similarly, , , and depend on whether short or long integers are used.

See also:


CHAR_BIT 8

Length of a char variable in bits.


CHAR_MAX 127/255

Maximal value which can be stored in a char variable.


CHAR_MIN (-128)/0

Minimal value which can be stored in a char variable.


INT_MAX 0x7FFF/0x7FFFFFFF

Maximal value which can be stored in an int variable.


INT_MIN (() 0x8000/0x80000000)

Minimal value which can be stored in an int variable.


LONG_MAX 0x7FFFFFFFL

Maximal value which can be stored in a long int variable.


LONG_MIN (() 0x80000000L)

Minimal value which can be stored in a long int variable.


SCHAR_MAX 127

Maximal value which can be stored in a signed char variable.


SCHAR_MIN (-128)

Minimal value which can be stored in a signed char variable.


SHRT_MAX 0x7FFF

Maximal value which can be stored in a short int variable.


SHRT_MIN (() 0x8000)

Minimal value which can be stored in a short int variable.


UCHAR_MAX 255

Maximal value which can be stored in an unsigned char variable.


UINT_MAX 0xFFFFU/0xFFFFFFFFUL

Maximal value which can be stored in an unsigned int variable.


ULONG_MAX 0xFFFFFFFFUL

Maximal value which can be stored in an unsigned long int variable.


USHRT_MAX 0xFFFFU

Maximal value which can be stored in an unsigned short variable.


阅读(1136) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~