procedure extChk(S:string);
var
i:integer;
begin
for i:=1 to length(s) do
case ord(s) of
42:....;
43:....;
45: if (ord(S[i+1])=42) or (ord(S[i+1])=47) then
ShowMessage(Format('%s和%s不能在一起',[S,S[i+1]]));
47:....;
end;
end;
procedure TForm1.Button1Click(Sender: TObject);
begin
extChk('-*') ;
end;