previous next top contents index framed top this page unframed
bMask makes a bit mask, which is a contiguous sequence of 1-bits embedded within 0-bits.
bMask returns a BITS that consists of 1-bits in the bit positions from lowBit to highBit, and 0-bits everywhere else. The bits are numbered from right to left starting with 0.
If b is a BITS with all bits equal to 1-bit, then the result is the same as (b SHL lowBit) CLR (b SHL (highBit + 1)). The result is undefined if either lowBit or highBit is less than 0 or greater than or equal to the number of bits in a BITS, and the result is '0 if 0 LEQ highBit < lowBit.
lbMask (see Section 40.5) provides the same function for LONG BITS.
A garbage collection cannot occur during a call to bMask.
MAINSAIL Language Manual, Section 31.9