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
CompareUINTfunction return 0 if the blocks are identical. If they are different then function returns the first position that differ
Input
pMemoryBlockAPOINTER TO BYTE
address of MemoryBlockA
pMemoryBlockBPOINTER TO BYTE
address of MemoryBlockB
uiNumberOfBytesUINTnumber of bytes to compare