关闭Delphi范围检查一小部分代码
发布时间:2020-12-15 06:10:12 所属栏目:大数据 来源:网络整理
导读:如何关闭范围检查文件的一部分.关闭是很容易的,但是如何稍后恢复到项目设置?下面的伪代码应该解释一下: Unit1;//here's range checking on or off as per the project settingcode here...{$R-}//range checking is off here because the code causes rang
如何关闭范围检查文件的一部分.关闭是很容易的,但是如何稍后恢复到项目设置?下面的伪代码应该解释一下:
Unit1; //here's range checking on or off as per the project setting code here... {$R-} //range checking is off here because the code causes range check errors code here... //now I want to revert to the project setting. How do I do that? code here... end. 解决方法
见:
IFOPT directive.
{$IFOPT R+} {$DEFINE RANGEON} {$R-} {$ELSE} {$UNDEF RANGEON} {$ENDIF} //range checking is off here because the code causes range check errors //code here... {$IFDEF RANGEON} {$R+} {$UNDEF RANGEON} {$ENDIF} (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |