| United States-English |
|
|
|
![]() |
HP Pascal/HP-UX Programmer's Guide > Chapter 4 Predefined Pascal Constants, Data Types, and ModulesBit52 |
|
The predefined data type bit52 is a subrange, 0..252-1, that is stored in 64 bits. bit52 is a unique HP Pascal type because arithmetic operations on bit52 data are performed as unsigned 64-bit integers. Unsigned addition and subtraction do not overflow. Unsigned multiply may overflow. The compiler option OVFLCHECK has no effect. Note that there are no bit52 constants in the compiler. Therefore, numbers in the range maxint + 1..252 -1 can not be expressed directly. The function hex can be used with the compiler options TYPE_COERCION and RANGE to fill part of this range. The compiler option TYPE_COERCION is also needed when initializing a bit52 constant field. In this case, bit52() is not used. When bit52 is used in an executable statement, RANGE OFF must be used. For number in the range of 232..252-1, a run-time computation must be done. If the numbers are all constants, they must be type coerced to bit52 so they do not integer overflow. Variant records can also be used to build up these large constants. To determine if a type T is assignment compatible with bit52.
Example
(Example is continued on next page.)
|
||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||