在写程序的过程中,我使用ADO查询远程数据库,在DBGrid中现实查询的结果,同时,在DBGrid中设置右键菜单,当DBGrid没有获得查询结果的时候,会跳出右键菜单这个过程,这时候加了Exit这个过程,编译的时候提示 :Statement expected, but expression of type 'TBitBtn' found 请问各位大侠,这个问题怎么解决,在线等待
Unit SysUtils Syntax [Delphi] procedure Abort(); Description Use Abort to escape from an execution path without reporting an error.
Abort raises a special "silent exception" (EAbort), which operates like any other exception, but does not display an error message to the end user. Abort redirects execution to the end of the last exception block.
Raises a silent exception.
Unit
SysUtils Syntax
[Delphi] procedure Abort();
Description
Use Abort to escape from an execution path without reporting an error.
Abort raises a special "silent exception" (EAbort), which operates like any other exception, but does not display an error message to the end user. Abort redirects execution to the end of the last exception block.
Abort和Exit的区别在类的继承关系中区别很明显。
Exit仅结束该过程或函数,如果其有继承关系时,还将继续运行子类的部分代码,但是Abort将中止当前正在执行的过程,程序将弹出所有堆栈,程序将不运行任何其他的代码。
另外:pascal有所谓关键字和保留字,还有系统函数名等,我们取自己的标志符时应该尽量取和他们不一样的,还有名字空间等概念,都是相关的东东