全國最多中醫師線上諮詢網站-台灣中醫網
發文 回覆 瀏覽次數:891
推到 Plurk!
推到 Facebook!

procedure要如何自訂呢

答題得分者是:FrederickPau
jiannrong
一般會員


發表:58
回覆:36
積分:18
註冊:2002-05-09

發送簡訊給我
#1 引用回覆 回覆 發表時間:2003-01-14 00:44:21 IP:61.70.xxx.xxx 未訂閱
請教一下 我已經在public下面做了這樣的宣告 cyclemax:integer; 然後我在var下有做這樣的宣告 var FormMission: TFormMission; procedure cyclemaxdo; 以及在{$R *.DFM} 之下開始作此procedure procedure cyclemaxdo(); //計算有不完整的cycle begin if cyclemax > 0 then begin if stopstep=15 then step15(); end; end; 而此procedure則是在 procedure TFormMission.Button1Click(Sender: TObject); begin numberstep(); wrokday(); cycledo(); cyclemaxdo();; end; 這個cyclemax只有在cyclemaxdo()度過 想問一下 這樣的程式 當我再作編譯的時候 他告訴我 [Error] UFormMission.pas(112): Undeclared identifier: 'cyclemax' 而第112行 正是 if cyclemax > 0 then 這一行 請教一下 我的程式流程 是哪裡寫錯了呢 謝謝
FrederickPau
資深會員


發表:4
回覆:161
積分:268
註冊:2002-11-04

發送簡訊給我
#2 引用回覆 回覆 發表時間:2003-01-14 02:21:05 IP:61.228.xxx.xxx 未訂閱
你的 cyclemax:integer; 要寫在下面 如: var FormMission: TFormMission; cyclemax:integer; procedure cyclemaxdo; 因為你的 cyclemax 是宣告在 Form 裡. 另外一種方法. 你可以把 if cyclemax > 0 then 改成 if FormMission.cyclemax > 0 then
系統時間:2024-05-13 21:55:29
聯絡我們 | Delphi K.Top討論版
本站聲明
1. 本論壇為無營利行為之開放平台,所有文章都是由網友自行張貼,如牽涉到法律糾紛一切與本站無關。
2. 假如網友發表之內容涉及侵權,而損及您的利益,請立即通知版主刪除。
3. 請勿批評中華民國元首及政府或批評各政黨,是藍是綠本站無權干涉,但這裡不是政治性論壇!