Compare (FUN)¶
FUNCTION Compare : UINT
Function compares “MemoryBlockA” with “MemoryBlockB”. Up to “uiNumberOfBytes” will be compared.
Example:
abyMemoryBlockA : ARRAY[0..9] OF BYTE := 0,1,2,3,4,5,6,7,8,9 ;
abyMemoryBlockB : ARRAY[0..9] OF BYTE := 0,1,2,0,4,5,6,7,8,9 ;
->
MEM.Compare(ADR(abyMemoryBlockA),ADR(abyMemoryBlockB),10) = 4
- InOut:
Scope
Name
Type
Comment
Return
Compare
UINT
function return 0 if the blocks are identical. If they are different then function returns the first position that differ
Input
pMemoryBlockA
POINTER TO BYTE
address of MemoryBlockA
pMemoryBlockB
POINTER TO BYTE
address of MemoryBlockB
uiNumberOfBytes
UINT
number of bytes to compare