procedure TForm1.Button4Click(Sender: TObject);var
{和 StrComp、StrIComp、StrLComp、StrLIComp 也不一樣}
p1,p2: PChar;
n: Integer;
begin
p1 := 'A';
p2 := 'a';
n := CompareStr(p1, p2);
ShowMessage(IntToStr(n)); {-32}
n := CompareText(p1, p2);
ShowMessage(IntToStr(n)); {0}
end;
procedure TForm1.Button5Click(Sender: TObject);var
p1,p2: PChar;
n: Integer;
begin
p1 := 'A';
p2 := 'a';
n := StrComp(p1, p2);
ShowMessage(IntToStr(n)); {-32}
n := StrIComp(p1, p2);
ShowMessage(IntToStr(n)); {0}
n := StrLComp(p1, p2, 1);
ShowMessage(IntToStr(n)); {-32}
n := StrLIComp(p1, p2, 1);
ShowMessage(IntToStr(n)); {0}
end;
end.