190 lines
3.3 KiB
HTML
190 lines
3.3 KiB
HTML
<html>
|
|
<head>
|
|
<title>
|
|
C Guide--2.5 limits.h
|
|
</title>
|
|
<!-- Changed by: eric huss, 12-Mar-1997 -->
|
|
</head>
|
|
<body text="#000000" bgcolor="#FFFFFF">
|
|
|
|
<center>
|
|
<table border=0 width=100%>
|
|
<tr>
|
|
<td align=left width=20% valign=top>
|
|
<a href="2.4.html">
|
|
<img src="left.gif" border=0>
|
|
Previous Section<br>
|
|
2.4 float.h</a></td>
|
|
<td align=center width=60% valign=top>
|
|
| <a href="index.html">Table of Contents</a> |
|
|
<a href="index2.html">Index</a> |</td>
|
|
<td align=right width=20% valign=top>
|
|
<a href="2.6.html">
|
|
Next Section
|
|
<img src="right.gif" border=0><br>
|
|
2.6 locale.h</a></td>
|
|
</tr>
|
|
</table>
|
|
</center>
|
|
<hr>
|
|
|
|
|
|
<h1> 2.5 limits.h</h1>
|
|
<p>
|
|
The limits header defines the characteristics of variable types.
|
|
<p>
|
|
<h2>2.5.1 Defined Values</h2>
|
|
<p>
|
|
The following values are defined with the <code><b>#define</b></code> directive. These values are
|
|
implementation-specific, but may not be any lower than what is given here.
|
|
<table border=1>
|
|
<tr>
|
|
<td>
|
|
|
|
<code><b>CHAR_BIT 8</b></code>
|
|
</td>
|
|
<td>
|
|
Number of bits in a byte.
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<code><b>SCHAR_MIN -127</b></code>
|
|
</td>
|
|
<td>
|
|
Minimum value for a signed char.
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<code><b>SCHAR_MAX +127</b></code>
|
|
</td>
|
|
<td>
|
|
Maximum value for a signed char.
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<code><b>UCHAR_MAX 255</b></code>
|
|
</td>
|
|
<td>
|
|
Maximum value for an unsigned char.
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<code><b>CHAR_MIN<br>
|
|
CHAR_MAX</b></code>
|
|
</td>
|
|
<td>
|
|
These define the minimum and maximum values for a char. If a char is being
|
|
represented as a signed integer, then their values are the same as the signed char (<code><b>SCHAR</b></code>)
|
|
values. Otherwise <code><b>CHAR_MIN</b></code> is 0 and <code><b>CHAR_MAX</b></code> is the same as <code><b>UCHAR_MAX</b></code>.
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<code><b>MB_LEN_MAX 1</b></code>
|
|
</td>
|
|
<td>
|
|
Maximum number of bytes in a multibyte character.
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<code><b>SHRT_MIN -32767</b></code>
|
|
</td>
|
|
<td>
|
|
Minimum value for a short int.
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<code><b>SHRT_MAX +32767</b></code>
|
|
</td>
|
|
<td>
|
|
Maximum value for a short int.
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<code><b>USHRT_MAX 65535</b></code>
|
|
</td>
|
|
<td>
|
|
Maximum value for an unsigned short int.
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<code><b>INT_MIN -32767</b></code>
|
|
</td>
|
|
<td>
|
|
Minimum value for an int.
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<code><b>INT_MAX +32767</b></code>
|
|
</td>
|
|
<td>
|
|
Maximum value for an int.
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<code><b>UINT_MAX 65535</b></code>
|
|
</td>
|
|
<td>
|
|
Maximum value for an unsigned int.
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<code><b>LONG_MIN -2147483647</b></code>
|
|
</td>
|
|
<td>
|
|
Minimum value for a long int.
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<code><b>LONG_MAX +2147483647</b></code>
|
|
</td>
|
|
<td>
|
|
Maximum value for a long int.
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<code><b>ULONG_MAX 4294967295</b></code>
|
|
</td>
|
|
<td>
|
|
Maximum value for an unsigned long int.
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
<hr>
|
|
|
|
<center>
|
|
<table border=0 width=100%>
|
|
<tr>
|
|
<td align=left width=20% valign=top>
|
|
<a href="2.4.html">
|
|
<img src="left.gif" border=0>
|
|
Previous Section<br>
|
|
2.4 float.h</a></td>
|
|
<td align=center width=60% valign=top>
|
|
| <a href="index.html">Table of Contents</a> |
|
|
<a href="index2.html">Index</a> |</td>
|
|
<td align=right width=20% valign=top>
|
|
<a href="2.6.html">
|
|
Next Section
|
|
<img src="right.gif" border=0><br>
|
|
2.6 locale.h</a></td>
|
|
</tr>
|
|
</table>
|
|
</center>
|
|
|
|
</body>
|
|
</html>
|