名稱空間
變體
操作

標準庫標頭檔案 <limits.h>

來自 cppreference.com

此標頭檔案是型別支援庫的一部分,特別是C 數字限制介面的一部分。

核心語言整數型別限制
BOOL_WIDTH
(C23)
_Bool 的位寬
(宏常量)
BOOL_MAX
(C29)
_Bool 的最大值
(宏常量)
CHAR_BIT
位元組的位寬度
(宏常量) [編輯]
MB_LEN_MAX
多位元組字元中的最大位元組數
(宏常量) [編輯]
CHAR_WIDTH
(C23)
char 的位寬,與 CHAR_BIT 相同
(宏常量)
CHAR_MIN
char 的最小值
(宏常量) [編輯]
CHAR_MAX
char 的最大值
(宏常量) [編輯]
SCHAR_WIDTHSHRT_WIDTHINT_WIDTHLONG_WIDTHLLONG_WIDTH
(C23)(C23)(C23)(C23)(C23)
分別是 signed charshortintlonglong long 的位寬
(宏常量)
SCHAR_MINSHRT_MININT_MINLONG_MINLLONG_MIN
(C99)
分別是 signed charshortintlonglong long 的最小值
(宏常量) [編輯]
SCHAR_MAXSHRT_MAXINT_MAXLONG_MAXLLONG_MAX
(C99)
分別是 signed charshortintlonglong long 的最大值
(宏常量) [編輯]
UCHAR_WIDTHUSHRT_WIDTHUINT_WIDTHULONG_WIDTHULLONG_WIDTH
(C23)(C23)(C23)(C23)(C23)
分別是 unsigned charunsigned shortunsigned intunsigned longunsigned long long 的位寬
(宏常量)
UCHAR_MAXUSHRT_MAXUINT_MAXULONG_MAXULLONG_MAX
(C99)
分別是 unsigned charunsigned shortunsigned int
unsigned longunsigned long long 的最大值
(宏常量) [編輯]
BITINT_MAXWIDTH
(C23)
型別說明符 _BitInt(N) 中位精確整數宣告所支援的最大寬度 N,大於或等於 ULLONG_WIDTH
(宏常量)

[編輯] 概要

#define __STDC_VERSION_LIMITS_H__ 202311L
 
#define BITINT_MAXWIDTH  /* see description */
#define BOOL_MAX         /* see description */
#define BOOL_WIDTH       /* see description */
#define CHAR_BIT         /* see description */
#define CHAR_MAX         /* see description */
#define CHAR_MIN         /* see description */
#define CHAR_WIDTH       /* see description */
#define INT_MAX          /* see description */
#define INT_MIN          /* see description */
#define INT_WIDTH        /* see description */
#define LLONG_MAX        /* see description */
#define LLONG_MIN        /* see description */
#define LLONG_WIDTH      /* see description */
#define LONG_MAX         /* see description */
#define LONG_MIN         /* see description */
#define LONG_WIDTH       /* see description */
#define MB_LEN_MAX       /* see description */
#define SCHAR_MAX        /* see description */
#define SCHAR_MIN        /* see description */
#define SCHAR_WIDTH      /* see description */
#define SHRT_MAX         /* see description */
#define SHRT_MIN         /* see description */
#define SHRT_WIDTH       /* see description */
#define UCHAR_MAX        /* see description */
#define UCHAR_WIDTH      /* see description */
#define UINT_MAX         /* see description */
#define UINT_WIDTH       /* see description */
#define ULLONG_MAX       /* see description */
#define ULLONG_WIDTH     /* see description */
#define ULONG_MAX        /* see description */
#define ULONG_WIDTH      /* see description */
#define USHRT_MAX        /* see description */
#define USHRT_WIDTH      /* see description */