ShineOn.RTL - arrays of variant as parameter and TDateTime

Hi,
I have a problem compiling some code. Here is an example of my problem.
Delcare a function that has an Array of Variant as a parameter:

procedure Function01(InArray: Array of Variant);
begin
  MessageBox.Show(IntToStr(High(InArray)));
end;

then try using this function somewhere with a TDateTime value in the array:

Function01([Now]);

try to compile and you get this error:
(PE19) There is no overloaded method "Function01" with these parameters

A workaround I have found is that you can cast TDateTime as DateTime and it 
seems to work. (like Function01([DateTime(Now)]); ) However this is not a 
plausable solution as I would have to change 100's of instances of this.

Since the ShineOn.RTL is meant to emulate the Delphi RTL - I would classify 
as a bug.

Best Regards,
Lukasz Rewak
http://www.wavesystems.com.au
0
Lukasz
10/21/2009 4:12:46 AM
embarcadero.delphiprism.lang 246 articles. 0 followers. Follow

1 Replies
545 Views

Similar Articles

[PageSpeed] 42

Hi,

> A workaround I have found is that you can cast TDateTime as DateTime and it 
> seems to work. (like Function01([DateTime(Now)]); ) However this is not a 
> plausable solution as I would have to change 100's of instances of this.
> 
> Since the ShineOn.RTL is meant to emulate the Delphi RTL - I would classify 
> as a bug.

I added a new im;icit operator for TDateTime, so now your code should work.
Can you test it and let me know?


Best Regards,

Jeroen
0
Jeroen
10/21/2009 6:45:31 AM
Reply: