Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Delphi可以把method做 overloading嗎?

0 views
Skip to first unread message

聰明的木頭人

unread,
May 28, 1999, 3:00:00 AM5/28/99
to

as title, thanks!
--
* Origin: ★ 交通大學資訊科學系 BBS ★ <bbs.cis.nctu.edu.tw: 140.113.23.3>

小叉影~~

unread,
May 28, 1999, 3:00:00 AM5/28/99
to
※ 引述《tree...@cis.nctu.edu.tw (聰明的木頭人)》之銘言:
> as title, thanks!

Yes, Delphi 4 才支援。method & procedure/function 皆可,
不過比起 C++/Java 等麻煩, 要自行在後面加上 overload directive.
overload virtual method 時要再另加 reintroduce directive,
詳情請 man on-line help. For example:

function Divide(X, Y: Real): Real; overload;
begin
Result := X/Y;
end;

function Divide(X, Y: Integer): Integer; overload;
begin
Result := X div Y;
end;
--
※ Origin: 楓橋驛站<bbs.cs.nthu.edu.tw> ◆ From: a-189.RAS.NCTU.edu.tw

0 new messages