[in D4, I haven't got D5 to check whether this has changed]
The method
procedure TSomething.Do(const a :array of Integer);
will accept both static arrays and dynamic arrays.
but overload it
procedure TSomething.Do(const a :array of Integer); overload;
procedure TSomething.Do(const a :array of String); overload;
and now it only accepts static arrays... no other changes are necessary...
This was a very annoying discovery and pure luck that in using
dynamic arrays for 2 years in 5 products I had never once called an
overloaded method with a dynamic array (many functions have been
written that could have been but in each case by sheer blind luck static
arrays have been adequate).
Bugger...
I'm surprised that the fact a method is overloaded changes the method
signature for exactly the same declaration of parameter types.
Comments?
--
Aaron Scott-Boddendijk
INTAZ Limited
+64 7 838 3371 Voice
+64 7 838 3372 Fax
---------------------------------------------------------------------------
New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
Website: http://www.delphi.org.nz
To UnSub, send email to: [EMAIL PROTECTED]
with body of "unsubscribe delphi"