我试图在我的代码中将 boolean 变量 (curs) 设置为 false,但我收到此错误:
[Error] Main.pas(50): Incompatible types
谁知道这是什么意思?
if form1.Left = pt.X and form1.Top = pt.Y
then curs := false;
如果您知道或对发生的事情有任何想法,请随时分享。 :) 谢谢
-connorbp
最佳答案
那是因为你需要在括号之间进行相等性检查,像这样:
if ( form1.Left = pt.X ) and ( form1.Top = pt.Y ) then
curs := false;
关于delphi - boolean 计算错误 : Incompatible types,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9450424/