在一个函数中
Result := False;



..
if anintegervariable > 0 then ;
Result := True;


无论anitegervariable是什么值,这个函数始终返回True,
最后发现 if ...then 后面多了个分号; 编译不报错,是因为程序把if ...then;当成了一个空语句了
Result := False;


..
if anintegervariable > 0 then ;
Result := True;


最后发现 if ...then 后面多了个分号; 编译不报错,是因为程序把if ...then;当成了一个空语句了

浙公网安备 33010602011771号