GET-BITS function
- Last Updated: January 16, 2024
- 1 minute read
- OpenEdge
- Version 12.8
- Documentation
Interprets one or more consecutive bits in an integer variable or field as an ABL integer value and returns that value.
Syntax
|
- source
- An ABL integer variable.
- position
- A variable or expression that returns an integer. This parameter designates
the position of the lowest-order bit of the bits that are to be interpreted
as an integer. Bits are numbered from 1 through the length of an
integer; with 1 being the low-order bit. If position is
greater than the length of an integer, the AVM returns the Unknown value (
?). If position is less than 1, the AVM generates a run-time error. - numbits
- The number of bits to examine when generating the return value. If position plus numbits is greater than the length of an integer plus 1, the AVM generates a run-time error.
Note
This function can return a value greater than 32 bits if source is an INT64.