-
Declaration:
- function CompareChar(var buf1,buf2;len:longint):longint; function
CompareChar0(var buf1,buf2;len:longint):longint;
-
Description:
- CompareChar compares two memory regions buf1,buf2 on a character-per-character basis
for a total of len characters.
The CompareChar0 variant compares len bytes, or until a zero character is found.
The function returns one of the following values:
-
-1
- if buf1 and buf2 contain different characters in the first len positions, and the first such
character is smaller in buf1 than the character at the same position in buf2.
-
0
- if the first len characters in buf1 and buf2 are equal.
-
1
- if buf1 and buf2 contain different characters in the first len positions, and the first such
character is larger in buf1 than the character at the same position in buf2.
-
Errors:
- None.
-
See also:
- CompareByte (466),CompareWord (472),CompareDWord (470)
Listing: refex/ex100.pp