-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlimits.html
114 lines (97 loc) · 8 KB
/
limits.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<TITLE>limits.h</TITLE>
<STYLE TYPE="TEXT/CSS">
<!--
.IE3-DUMMY { CONT-SIZE: 100%; }
BODY { FONT-FAMILY: Verdana,Arial,Helvetica,Sans-Serif; BACKGROUND-COLOR: #E0E0E0; }
P { FONT-FAMILY: Verdana,Arial,Helvetica,Sans-Serif; }
H1 { FONT-FAMILY: Verdana,Arial,Helvetica,Sans-Serif; }
H2 { FONT-FAMILY: Verdana,Arial,Helvetica,Sans-Serif; }
H3 { FONT-FAMILY: Verdana,Arial,Helvetica,Sans-Serif; }
H4 { FONT-FAMILY: Verdana,Arial,Helvetica,Sans-Serif; }
H5 { FONT-FAMILY: Verdana,Arial,Helvetica,Sans-Serif; }
H6 { FONT-FAMILY: Verdana,Arial,Helvetica,Sans-Serif; }
UL { FONT-FAMILY: Verdana,Arial,Helvetica,Sans-Serif; }
TD { FONT-FAMILY: Verdana,Arial,Helvetica,Sans-Serif; BACKGROUND-COLOR: #FFFFFF; }
.NOBORDER { BACKGROUND-COLOR: #E0E0E0; PADDING: 0pt; }
.NOBORDER TD { FONT-FAMILY: Verdana,Arial,Helvetica,Sans-Serif; BACKGROUND-COLOR: #E0E0E0; PADDING: 0pt; }
.CODE { FONT-FAMILY: Courier New; }
-->
</STYLE>
</HEAD>
<BODY TEXT="#000000" BGCOLOR="#E0E0E0">
<FONT SIZE="5"><B>The <limits.h> Header File</B></FONT>
<HR>
<P><B>Various platform-dependent constants proposed by ANSI</B></P>
<H3><U>Constants</U></H3>
<DL INDENT="20"><DT><B><A HREF="#CHAR_BIT">CHAR_BIT</A></B><DD>Length of a char variable in bits.<IMG WIDTH="1" HEIGHT="20" ALIGN="TOP"><DT><B><A HREF="#CHAR_MAX">CHAR_MAX</A></B><DD>Maximal value which can be stored in a char variable.<IMG WIDTH="1" HEIGHT="20" ALIGN="TOP"><DT><B><A HREF="#CHAR_MIN">CHAR_MIN</A></B><DD>Minimal value which can be stored in a char variable.<IMG WIDTH="1" HEIGHT="20" ALIGN="TOP"><DT><B><A HREF="#INT_MAX">INT_MAX</A></B><DD>Maximal value which can be stored in an int variable.<IMG WIDTH="1" HEIGHT="20" ALIGN="TOP"><DT><B><A HREF="#INT_MIN">INT_MIN</A></B><DD>Minimal value which can be stored in an int variable.<IMG WIDTH="1" HEIGHT="20" ALIGN="TOP"><DT><B><A HREF="#LONG_MAX">LONG_MAX</A></B><DD>Maximal value which can be stored in a long int variable.<IMG WIDTH="1" HEIGHT="20" ALIGN="TOP"><DT><B><A HREF="#LONG_MIN">LONG_MIN</A></B><DD>Minimal value which can be stored in a long int variable.<IMG WIDTH="1" HEIGHT="20" ALIGN="TOP"><DT><B><A HREF="#SCHAR_MAX">SCHAR_MAX</A></B><DD>Maximal value which can be stored in a signed char variable.<IMG WIDTH="1" HEIGHT="20" ALIGN="TOP"><DT><B><A HREF="#SCHAR_MIN">SCHAR_MIN</A></B><DD>Minimal value which can be stored in a signed char variable.<IMG WIDTH="1" HEIGHT="20" ALIGN="TOP"><DT><B><A HREF="#SHRT_MAX">SHRT_MAX</A></B><DD>Maximal value which can be stored in a short int variable.<IMG WIDTH="1" HEIGHT="20" ALIGN="TOP"><DT><B><A HREF="#SHRT_MIN">SHRT_MIN</A></B><DD>Minimal value which can be stored in a short int variable.<IMG WIDTH="1" HEIGHT="20" ALIGN="TOP"><DT><B><A HREF="#UCHAR_MAX">UCHAR_MAX</A></B><DD>Maximal value which can be stored in an unsigned char variable.<IMG WIDTH="1" HEIGHT="20" ALIGN="TOP"><DT><B><A HREF="#UINT_MAX">UINT_MAX</A></B><DD>Maximal value which can be stored in an unsigned int variable.<IMG WIDTH="1" HEIGHT="20" ALIGN="TOP"><DT><B><A HREF="#ULONG_MAX">ULONG_MAX</A></B><DD>Maximal value which can be stored in an unsigned long int variable.<IMG WIDTH="1" HEIGHT="20" ALIGN="TOP"><DT><B><A HREF="#USHRT_MAX">USHRT_MAX</A></B><DD>Maximal value which can be stored in an unsigned short variable.</DL>
<P><B>Note:</B> <A HREF="#CHAR_MAX">CHAR_MAX</A> and <A HREF="#CHAR_MIN">CHAR_MIN</A> may have different values depending on whether chars are signed or not.
They are signed by default in GCC4TI, but this may be changed using a compiler command-line switch.
Similarly, <A HREF="#INT_MAX">INT_MAX</A>, <A HREF="#INT_MIN">INT_MIN</A>, and <A HREF="#UINT_MAX">UINT_MAX</A> depend on whether short or long integers are used.</P>
<P>See also: <A HREF="values.html">values.h</A></P>
<HR>
<H3><A NAME="CHAR_BIT"><U>CHAR_BIT</U></A></H3>
<P><TABLE BORDER="1" CELLPADDING="2"><TR><TD CLASS="CODE"><B><A HREF="cpp.html#SEC10">#define</A></B> CHAR_BIT 8</TD></TR></TABLE></P>
<P><B>Length of a char variable in bits.</B></P>
<HR>
<H3><A NAME="CHAR_MAX"><U>CHAR_MAX</U></A></H3>
<P><TABLE BORDER="1" CELLPADDING="2"><TR><TD CLASS="CODE"><B><A HREF="cpp.html#SEC10">#define</A></B> CHAR_MAX 127/255</TD></TR></TABLE></P>
<P><B>Maximal value which can be stored in a char variable.</B></P>
<HR>
<H3><A NAME="CHAR_MIN"><U>CHAR_MIN</U></A></H3>
<P><TABLE BORDER="1" CELLPADDING="2"><TR><TD CLASS="CODE"><B><A HREF="cpp.html#SEC10">#define</A></B> CHAR_MIN (-128)/0</TD></TR></TABLE></P>
<P><B>Minimal value which can be stored in a char variable.</B></P>
<HR>
<H3><A NAME="INT_MAX"><U>INT_MAX</U></A></H3>
<P><TABLE BORDER="1" CELLPADDING="2"><TR><TD CLASS="CODE"><B><A HREF="cpp.html#SEC10">#define</A></B> INT_MAX 0x7FFF/0x7FFFFFFF</TD></TR></TABLE></P>
<P><B>Maximal value which can be stored in an int variable.</B></P>
<HR>
<H3><A NAME="INT_MIN"><U>INT_MIN</U></A></H3>
<P><TABLE BORDER="1" CELLPADDING="2"><TR><TD CLASS="CODE"><B><A HREF="cpp.html#SEC10">#define</A></B> INT_MIN ((<B><A HREF="keywords.html#int">int</A></B>) 0x8000/0x80000000)</TD></TR></TABLE></P>
<P><B>Minimal value which can be stored in an int variable.</B></P>
<HR>
<H3><A NAME="LONG_MAX"><U>LONG_MAX</U></A></H3>
<P><TABLE BORDER="1" CELLPADDING="2"><TR><TD CLASS="CODE"><B><A HREF="cpp.html#SEC10">#define</A></B> LONG_MAX 0x7FFFFFFFL</TD></TR></TABLE></P>
<P><B>Maximal value which can be stored in a long int variable.</B></P>
<HR>
<H3><A NAME="LONG_MIN"><U>LONG_MIN</U></A></H3>
<P><TABLE BORDER="1" CELLPADDING="2"><TR><TD CLASS="CODE"><B><A HREF="cpp.html#SEC10">#define</A></B> LONG_MIN ((<B><A HREF="keywords.html#short">long</A></B>) 0x80000000L)</TD></TR></TABLE></P>
<P><B>Minimal value which can be stored in a long int variable.</B></P>
<HR>
<H3><A NAME="SCHAR_MAX"><U>SCHAR_MAX</U></A></H3>
<P><TABLE BORDER="1" CELLPADDING="2"><TR><TD CLASS="CODE"><B><A HREF="cpp.html#SEC10">#define</A></B> SCHAR_MAX 127</TD></TR></TABLE></P>
<P><B>Maximal value which can be stored in a signed char variable.</B></P>
<HR>
<H3><A NAME="SCHAR_MIN"><U>SCHAR_MIN</U></A></H3>
<P><TABLE BORDER="1" CELLPADDING="2"><TR><TD CLASS="CODE"><B><A HREF="cpp.html#SEC10">#define</A></B> SCHAR_MIN (-128)</TD></TR></TABLE></P>
<P><B>Minimal value which can be stored in a signed char variable.</B></P>
<HR>
<H3><A NAME="SHRT_MAX"><U>SHRT_MAX</U></A></H3>
<P><TABLE BORDER="1" CELLPADDING="2"><TR><TD CLASS="CODE"><B><A HREF="cpp.html#SEC10">#define</A></B> SHRT_MAX 0x7FFF</TD></TR></TABLE></P>
<P><B>Maximal value which can be stored in a short int variable.</B></P>
<HR>
<H3><A NAME="SHRT_MIN"><U>SHRT_MIN</U></A></H3>
<P><TABLE BORDER="1" CELLPADDING="2"><TR><TD CLASS="CODE"><B><A HREF="cpp.html#SEC10">#define</A></B> SHRT_MIN ((<B><A HREF="keywords.html#short">short</A></B>) 0x8000)</TD></TR></TABLE></P>
<P><B>Minimal value which can be stored in a short int variable.</B></P>
<HR>
<H3><A NAME="UCHAR_MAX"><U>UCHAR_MAX</U></A></H3>
<P><TABLE BORDER="1" CELLPADDING="2"><TR><TD CLASS="CODE"><B><A HREF="cpp.html#SEC10">#define</A></B> UCHAR_MAX 255</TD></TR></TABLE></P>
<P><B>Maximal value which can be stored in an unsigned char variable.</B></P>
<HR>
<H3><A NAME="UINT_MAX"><U>UINT_MAX</U></A></H3>
<P><TABLE BORDER="1" CELLPADDING="2"><TR><TD CLASS="CODE"><B><A HREF="cpp.html#SEC10">#define</A></B> UINT_MAX 0xFFFFU/0xFFFFFFFFUL</TD></TR></TABLE></P>
<P><B>Maximal value which can be stored in an unsigned int variable.</B></P>
<HR>
<H3><A NAME="ULONG_MAX"><U>ULONG_MAX</U></A></H3>
<P><TABLE BORDER="1" CELLPADDING="2"><TR><TD CLASS="CODE"><B><A HREF="cpp.html#SEC10">#define</A></B> ULONG_MAX 0xFFFFFFFFUL</TD></TR></TABLE></P>
<P><B>Maximal value which can be stored in an unsigned long int variable.</B></P>
<HR>
<H3><A NAME="USHRT_MAX"><U>USHRT_MAX</U></A></H3>
<P><TABLE BORDER="1" CELLPADDING="2"><TR><TD CLASS="CODE"><B><A HREF="cpp.html#SEC10">#define</A></B> USHRT_MAX 0xFFFFU</TD></TR></TABLE></P>
<P><B>Maximal value which can be stored in an unsigned short variable.</B></P>
<HR>
<H3><A HREF="index.html">Return to the main index</A></H3>
</BODY>
</HTML>