MemCompare
See Also: Memory Management Functions
Purpose
Compares the contents of two memory blocks.
Return Type
Syntax
(MemCompare({pMemBlock1}, {pMemBlock2}, {iBytes}))
Parameters
- {pMemBlock1} and {pMemBlock2}: Pointers to memory blocks.
- {iBytes}: The number of bytes to compare.
What It Does
MemCompare returns zero if the two memory blocks are equal and nonzero if the memory blocks are unequal. Use of MemCompare with invalid parameters will likely crash your program.
Example
Function AreBlocksEqual Pointer a1 Pointer a2 Integer iBytes Returns Boolean
Boolean bRetVal
Move (MemCompare(a1, a2, iBytes)) to bRetVal
If (bRetVal = 0)
Function_Return 1
Else
Function_Return 0
End_Function