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 - FindBlock- UINT- function returns 0, if “MemoryBlockB” cannot be found. Otherwise the function returns the position of the first occurence - Input - pMemoryBlockA- POINTER TO BYTE - address of MemoryBlockA - uiLengthBlockA- UINT- length of MemoryBlockA in byte - pMemoryBlockB- POINTER TO BYTE - address of MemoryBlockB - uiLengthBlockB- UINT- length of MemoryBlockB in byte 
