[Overview][Constants][Types][Classes][Procedures and functions][Variables] Reference for unit 'sysutils' (#rtl)

CompareMemRange

Compare 2 memory locations

Declaration

Source position: sysstrh.inc line 72

function CompareMemRange(

  P1: Pointer;

  P2: Pointer;

  Length: cardinal

):Integer;

Description

CompareMemRangecompares the 2 memory locations pointed to by P1and P2byte per byte. It stops comparing after Lengthbytes have been compared, or when it has encountered 2 different bytes. The result is then

>0
if a byte in range P1was found that is bigger than the corresponding byte in range P2.
0
if all bytes in range P1are the same as the corresponding bytes in range P2.
<0
if a byte in range P1was found that is less than the corresponding byte in range P2.

Errors

None.

See also

SameText

  

Checks whether 2 strings are the same (case insensitive)