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

class question!

尚未結案
lhh
一般會員


發表:16
回覆:21
積分:7
註冊:2004-11-14

發送簡訊給我
#1 引用回覆 回覆 發表時間:2004-11-17 21:43:11 IP:213.106.xxx.xxx 未訂閱
original code:     unit Unit3;    interface    uses classes,porms,DB,DBTables,Nb32Types,Dialogs,Controls,sysUtils,NBMapsession,     proSave,ModelUtil,MeasTypes,progress;    type   TcusType = (cusLN{individual customer profile}, cusEX{exceptional profile},cusOther);        TModelProf = class       Proflist:TprofileList;    implementation    end.    Q: 1. TcusType = (cusLN{individual customer profile}, cusEX{exceptional profile},cusOther); what is the meaning of this expression? why no class is placed after = (TcusType = class(cusLN{individual customer profile}, cusEX{exceptional profile},cusOther);    Q2.  TModelProf = class why no ,e.g. Tobject,Tfrom, after the class?    thanx a lot!              
hagar
版主


發表:143
回覆:4056
積分:4445
註冊:2002-04-14

發送簡訊給我
#2 引用回覆 回覆 發表時間:2004-11-18 07:54:32 IP:202.39.xxx.xxx 未訂閱
1.TcusType 是 Enumerated type, 所以後面沒有 class 關鍵字 表示 TCusType 的值可能是 cusLn 或是 cusEx 或是 cusOther 任何一種 其它像是 TWindowState / TPosition 等也是 可以參考這篇: http://delphi.ktop.com.tw/topic.php?TOPIC_ID=52123 2.TModelProf = class 寫法等同於 TModelProf = class(TObject) 表示 TModelProf 是繼承自 TObject
系統時間:2024-07-03 11:18:37
聯絡我們 | Delphi K.Top討論版
本站聲明
1. 本論壇為無營利行為之開放平台,所有文章都是由網友自行張貼,如牽涉到法律糾紛一切與本站無關。
2. 假如網友發表之內容涉及侵權,而損及您的利益,請立即通知版主刪除。
3. 請勿批評中華民國元首及政府或批評各政黨,是藍是綠本站無權干涉,但這裡不是政治性論壇!