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

Ambigous!

0 views
Skip to first unread message

Janez Makovsek

unread,
Feb 4, 2000, 3:00:00 AM2/4/00
to
Hi!

Funny that Delphi compiler does not allow this:

procedure TestX(x1: double; x: array of double); overload;
procedure TestX(x1: single; x: array of single); overload;

Calling either of the versions results in:

Error 266. Ambiguous overloaded call to '<name>'

There is no ambiguouty. I guess open array parameters are just not allowed
in procedure overloading.

Janez.

Bjørge Sæther

unread,
Feb 4, 2000, 3:00:00 AM2/4/00
to
It's ambigous because you'll not know whether to interpret a float value
as a Double or a Single. In fact, you don't need both. Stick to the
Double. It does it for Single values, too.

--
Bjoerge Saether
Consultant / Developer
Asker, Norway
bsaether....@online.no (remove the obvious)

Janez Makovsek skrev i meldingen <87e3pm$20i$1...@strelovod.uni-mb.si>...

0 new messages