This section contains 269 words (approx. 1 page at 300 words per page) |
The term library constant is relevant to computer science in the context of programming and programming languages. Library constants are defined constants that determine several numerically related properties that are permitted by a particular operating system. These properties include the range of integers, the range of real numbers, and the number of digits of precision (the number of integers appearing after the decimal place) that a system will permit.
In addition to their defining roles, the library constants found in programming languages are also useful in permitting programming tasks.
For example, in the libraries of the C++ operating system, two files, designated "limits.h" and "float.h," define library constants. The library constants and their meanings are summarized below:
- INT_MAX: Designates the maximum allowable positive value that an integer may have.
- INT_MIN: Designates the minimum allowable negative value that an integer may have.
- DBL_MAX: Designates the maximum allowable positive double value.
- DBL_MIN: Designates the minimum allowable negative double value.
- DBL_DIG: Designates the maximum number of digits of precision.
The actual values specified by the library constants vary from one operating system to another.
As another example, in the libraries of occam, a parallel computing language, the constants and protocols are defined in six files. These are summarized below:
- hostio.inc: Designates constants for the host file server interface.
- streamio.inc: Designates constants for the stream i/o interface.
- mathvals.inc: Designates math constants.
- linkaddr.inc: Designates addresses of microprocessor links.
- icks.inc: Designates rates of the microprocessor clocks.
- msdos.inc: Designates constants specific to DOS.
This section contains 269 words (approx. 1 page at 300 words per page) |