Memory_Compare

<< Click to Display Table of Contents >>

Navigation:  ThinBASIC Core Language > BuiltIn Functions > Memory handling and pointers >

Memory_Compare

 

Description

 

Compare two memory areas checking if they contain the exact same bytes.

 

Syntax

 

lResult = Memory_Compare(pMem1, pMem2, Size)

 

Returns

 

Number.

Zero: means the two memory areas are the same

A number: the first byte where the two memory areas start to differ

 

Parameters

 

Name

Type

Optional

Meaning

pMem1

Numeric

No

A valid 32-bit memory address

pMem2

Numeric

No

A valid 32-bit memory address

Size

Numeric

Yes

A numeric expression that specifies the number of consecutive bytes to check

 

Remarks

 

Attention:it is programmer responsibility to be sure that at the two addresses there are at least Size bytes already allocated otherwise application will crash with a GPF (General Protection Failure) runtime error will be fired by the operating system

 

Restrictions

 

See also

 

Examples