//Delphi模拟c语言的memcmp函数。(返回值和c完全一样)
function memcmp(cs,ct:Pointer; count:Cardinal):Integer;
var
su1,su2:PByte;
begin
su1 := cs;
su2 := ct;
while 0<count do
begin
Result:=su1^-su2^;
if Result<>0 then
Break;
Dec(count);
Inc(su1);
Inc(su2);
end;
end;
function memcmp(cs,ct:Pointer; count:Cardinal):Integer;
var
su1,su2:PByte;
begin
su1 := cs;
su2 := ct;
while 0<count do
begin
Result:=su1^-su2^;
if Result<>0 then
Break;
Dec(count);
Inc(su1);
Inc(su2);
end;
end;
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货