当我使用这两个代码运行应用程序时,显示相同的错误:
运算符不适用于此操作数类型
procedure TForm1.Button4Click(Sender: TObject);
begin
If (shape1.Brush.Color:=clblue and shape2.Brush.Color:=clblue) then
begin
showMessage('error');
end;
procedure TForm1.Button4Click(Sender: TObject);
begin
If (shape1.Brush.Color:=clblue) and (shape2.Brush.Color:=clblue) then
begin
showMessage('error');
end;
Run Code Online (Sandbox Code Playgroud)