about exit function |
尚未結案
|
QOO10
初階會員 ![]() ![]() 發表:59 回覆:89 積分:29 註冊:2002-12-25 發送簡訊給我 |
|
william
版主 ![]() ![]() ![]() ![]() ![]() 發表:66 回覆:2535 積分:3048 註冊:2002-07-11 發送簡訊給我 |
Why not? From the help: procedure Abort; C syntax: extern PACKAGE void __fastcall Abort(void); 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.
|
QOO10
初階會員 ![]() ![]() 發表:59 回覆:89 積分:29 註冊:2002-12-25 發送簡訊給我 |
引言: Why not? From the help: procedure Abort; C syntax: extern PACKAGE void __fastcall Abort(void); 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 procedure help 但還是不了??可否請您舉如上例..謝謝!! |
william
版主 ![]() ![]() ![]() ![]() ![]() 發表:66 回覆:2535 積分:3048 註冊:2002-07-11 發送簡訊給我 |
procedure MyAbort; begin ShowMessage('edit'); Abort; end; procedure deltail.dbgride1colenter(sender:tobject) begin if dsMaster.state = dsInsert then begin MyAbort; ShowMessage('Never get executed'); end; end;Since Abort is actually an exception, it will stop the execution until handled. |
channel
尊榮會員 ![]() ![]() ![]() ![]() ![]() ![]() 發表:67 回覆:707 積分:854 註冊:2002-05-02 發送簡訊給我 |
|
T.J.B
版主 ![]() ![]() ![]() ![]() ![]() 發表:29 回覆:532 積分:497 註冊:2002-08-14 發送簡訊給我 |
先宣告 procedure _stare(mode :string); 然後
procedure _stare(mode :string); begin if mode = 'dsinsert' then begin showmessage('edit'); abort; end; end;最後在 procedure deltail.dbgride1colenter(sender:tobject) begin if dsMaster.state = dsInsert then begin _stare('dsinsert'); end; end;如此即可 ps : dsinser 應該是 dsinsert 是不是你打錯了 天行健 君子當自強不息~~@.@
------
天行健 君子當自強不息~~@.@ |
QOO10
初階會員 ![]() ![]() 發表:59 回覆:89 積分:29 註冊:2002-12-25 發送簡訊給我 |
引言: 先宣告 procedure _stare(mode :string); 然後procedure _stare(mode :string); begin if mode = 'dsinsert' then begin showmessage('edit'); abort; end; end;最後在procedure deltail.dbgride1colenter(sender:tobject) begin if dsMaster.state = dsInsert then begin _stare('dsinsert'); end; end;如此即可 ps : dsinser 應該是 dsinsert 是不是你打錯了 天行健 君子當自強不息~~@.@ 謝謝您 |
本站聲明 |
1. 本論壇為無營利行為之開放平台,所有文章都是由網友自行張貼,如牽涉到法律糾紛一切與本站無關。 2. 假如網友發表之內容涉及侵權,而損及您的利益,請立即通知版主刪除。 3. 請勿批評中華民國元首及政府或批評各政黨,是藍是綠本站無權干涉,但這裡不是政治性論壇! |