class question! |
尚未結案
|
lhh
一般會員 ![]() ![]() 發表:16 回覆:21 積分:7 註冊:2004-11-14 發送簡訊給我 |
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 發送簡訊給我 |
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
|
本站聲明 |
1. 本論壇為無營利行為之開放平台,所有文章都是由網友自行張貼,如牽涉到法律糾紛一切與本站無關。 2. 假如網友發表之內容涉及侵權,而損及您的利益,請立即通知版主刪除。 3. 請勿批評中華民國元首及政府或批評各政黨,是藍是綠本站無權干涉,但這裡不是政治性論壇! |