變數問題 |
答題得分者是:GGL
|
hotswin
中階會員 發表:72 回覆:92 積分:52 註冊:2003-11-06 發送簡訊給我 |
|
GGL
資深會員 發表:104 回覆:600 積分:335 註冊:2006-11-05 發送簡訊給我 |
|
change.jian
版主 發表:29 回覆:620 積分:439 註冊:2003-06-02 發送簡訊給我 |
hi,依照Delphi online help的說明,這個稱為"Untyped parameters",即你可以傳任何型態的參數進去. 不過,即使是任何型態都可以傳,但被呼叫的程式裡仍然會需要對傳入的參數做檢查 底下是online help的說明
You can omit type specifications when declaring var, const, and out parameters. (Value parameters must be typed.) For example, procedure TakeAnything(const C); declares a procedure called TakeAnything that accepts a parameter of any type. When you call such a routine, you cannot pass it a numeral or untyped numeric constant.
Within a procedure or function body, untyped parameters are incompatible with every type. To operate on an untyped parameter, you must cast it. In general, the compiler cannot verify that operations on untyped parameters are valid.
|
hotswin
中階會員 發表:72 回覆:92 積分:52 註冊:2003-11-06 發送簡訊給我 |
|
hotswin
中階會員 發表:72 回覆:92 積分:52 註冊:2003-11-06 發送簡訊給我 |
本站聲明 |
1. 本論壇為無營利行為之開放平台,所有文章都是由網友自行張貼,如牽涉到法律糾紛一切與本站無關。 2. 假如網友發表之內容涉及侵權,而損及您的利益,請立即通知版主刪除。 3. 請勿批評中華民國元首及政府或批評各政黨,是藍是綠本站無權干涉,但這裡不是政治性論壇! |