| United States-English |
|
|
|
![]() |
HP Pascal/HP-UX Programmer's Guide > Chapter 4 Predefined Pascal Constants, Data Types, and ModulesBit32 |
|
The predefined data type bit32 is a subrange, 0..232-1, that is stored in 32 bits. bit32 is a unique HP Pascal type because arithmetic operations on bit32 data are performed as unsigned 32-bit integers. Unsigned addition and subtraction do not overflow. Unsigned multiply can overflow unless the compiler option OVFLCHECK is used. Note that there are no bit32 constants in the compiler. Therefore, numbers in the range maxint + 1..232 -1 can not be expressed directly. The function hex can be used with the compiler options TYPE_COERCION and RANGE to provide bit32 constants. The compiler option TYPE_COERCION is also needed when initializing a bit32 constant field. In this case, bit32() is not used. When bit32 is used in an executable statement, RANGE OFF must be used. To determine if a type T is assignment compatible with bit32:
Example
|
|||||||||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||