FindBlock (FUN)¶
FUNCTION FindBlock : UINT
Function looks for the first occurence of “MemoryBlockB” within “MemoryBlockA”.
Example:
abyMemoryBlockA : ARRAY[0..9] OF BYTE := 0,1,2,3,4,5,6,7,8,9 ;
abyMemoryBlockB : ARRAY[0..2] OF BYTE := 6,7,8 ;
->
MEM.FindBlock(ADR(abyMemoryBlockA),10,ADR(abyMemoryBlockB),3) = 7
- InOut:
Scope
Name
Type
Comment
Return
FindBlockUINTfunction returns 0, if “MemoryBlockB” cannot be found. Otherwise the function returns the position of the first occurence
Input
pMemoryBlockAPOINTER TO BYTE
address of MemoryBlockA
uiLengthBlockAUINTlength of MemoryBlockA in byte
pMemoryBlockBPOINTER TO BYTE
address of MemoryBlockB
uiLengthBlockBUINTlength of MemoryBlockB in byte