This function tests all the values of the specified bit in the on-masks for logical equivalence and all the values in the off-masks for equivalence and returns TRUE if the equivalence holds. Note that bitNum starts at zero.
Examples:
Element number | on-bits | off-bits |
1 | 0010010101101 | 1010110101100 |
2 | 1110101001110 | 1001010101001 |
3 | 0110010100110 | 1000110001010 |
4 | 0110111001110 | 0010010100101 |
5 | 0010000101101 | 0000111100011 |
Taking the right-most bit of each mask to be bit 0, bits 2, 4, 9 and 10 of the on-masks are equivalent, whereas bits 4, 7 and 11 of the off-masks are equivalent. Hence allBitsEquiv() would return TRUE for bitNum=4 but not otherwise.
logical(bool) function allBitsEquiv(bitMasks, bitNum) type(BitMaskT), intent(in) :: bitMasks(:) integer(int32), intent(in) :: bitNum end function allBitsEquiv