| UtilsLib REALbasic Plugin |
|
MemoryBlock.CompareBits Method
Use this method to compare a block of bits from one MemoryBlock to another.
CompareBits(
byteOffsetA
as Integer,
bitOffsetA
as Integer,
blockB
as MemoryBlock,
byteOffsetB
as Integer,
bitOffsetB
as Integer,
bitCount
as Integer)
as Boolean
Parameters
- byteOffsetA
- This parameter can be used to specify byte offset the first MemoryBlock.
- bitOffsetA
- This parameter can be used to specify bit offset the first MemoryBlock.
- blockB
- The MemoryBlock to compare to.
- byteOffsetB
- This parameter can be used to specify byte offset the second MemoryBlock.
- bitOffsetB
- This parameter can be used to specify bit offset the second MemoryBlock.
- bitCount
- The count of bits to compare.
Returns
- Boolean
Remarks
Returns: True if the bits were equal.
This method is not bounds checked in any way. You are responsible for making sure you don't go out of bounds.
Note that this is bitwise compare, not byte wise and is because of that not very efficient. You can for example compare 5 bits.
This method is available on REALbasic 5.0 systems by adding a MemoryBlock parameter in front of other parameters.
Supported Platforms:
PPC - MacOS 9Carbon - MacOS 9 and MacOS X (PEF)MacOS X PPC - (Mach-O)MacOS X Universal Binary (Mach-O)Win32 - WindowsLinux x86
See Also
MemoryBlock Class Extension