COHERENT manpages

This page displays the COHERENT manpage for limits.h [Define numerical limits].

List of available manpages
Index


limits.h -- Header File

Define numerical limits
#include <limits.h>

The  header file  <limits.h> defines  macros  that set  the numerical
limits for the translation environment.

The following table gives the  macros defined in limits.h. Each value given
is the macro's minimum maximum: a conforming implementation of C must  meet
these limits, and may exceed them.

CHAR_BIT
     Number of bits in a char. This must be at least eight.

CHAR_MAX
     Largest  value  representable  in  an  object  of type  char.  If  the
     implementation defines  a char to be  signed, then it is  equal to the
     value of the  macro SCHAR_MAX; otherwise, it is equal  to the value of
     the macro UCHAR_MAX.

CHAR_MIN
     Smallest  value  representable  in an  object  of  type  char. If  the
     implementation defines  a char to be  signed, then it is  equal to the
     value of the macro SCHAR_MIN; otherwise, it is zero.

INT_MAX
     Largest value  representable in an object  of type int; it  must be at
     least 32,767 (0x7FFF).

INT_MIN
     Smallest value  representable in an  object of type int;  no less more
     -32,767.

LONG_MAX
     Largest value representable in an object  of type long int; it must be
     at least 2,147,483,647 (0x7FFFFFFFL).

LONG_MIN
     Smallest value representable in an object of type long int; it must be
     at most -2,147,483,647.

MB_LEN_MAX
     Largest number of bytes in any multibyte character, for any locale; it
     must be at least one.

OPEN_MAX
     The maximum number of file descriptors  that a process can hold at any
     given time.

     Please note  that this constant  gives a ``snapshot'' of  the state of
     COHERENT  at  this  time.   Using  this  constant  in  a  program,  in
     particular to  size an array,  greatly decreases the  portability of a
     program, and  may cause  it to  behave incorrectly.  To  determine the
     number  of file  descriptors that the  operating system  permits right
     now, use the system call sysconf(). Caveat utilitor!

SCHAR_MAX
     Largest value representable in an  object of type signed char; it must
     be at least 127.

SCHAR_MIN
     Smallest value representable in an object of type signed char; it must
     be at most -127.

SHRT_MAX
     Largest value representable in an object of type short int; it must be
     at least 32,767 ((short)0x7FFF).

SHRT_MIN
     Smallest value  representable in an object of type  short int; it must
     be at most -32,767.

UCHAR_MAX
     Largest value  representable in  an object  of type unsigned  char; it
     must be at least 255.

UINT_MAX
     Largest value representable in an object of type unsigned int; it must
     be at least 65,535 ((unsigned int)0xFFFF).

ULONG_MAX
     Largest value representable in an object of type unsigned long int; it
     must be at least 4,294,967,295 ((unsigned long)0xFFFFFFFFL).

USHRT_MAX
     Largest value  representable in an object of  type unsigned short int;
     it must be at least 65,535 ((unsigned short)0xFFFF).

See Also

header files
ANSI Standard, §5.2.4.2.1
POSIX Standard, §2.8

Notes

limits.h sets fixed  limits.  If a limit is not  completely fixed, then the
symbol is not  defined, and a process must use  sysconf() or pathconf(), as
appropriate, to find the limit's value for the current run of the process.