Re: Delphi.NET
- From: Rob Kennedy <me3@xxxxxxxxxxx>
- Date: Tue, 26 Jun 2007 22:53:58 -0500
Hans-Peter Diettrich wrote:
Daniel Hobson wrote:You cannot do this either in Turbo Delphi.NET.
Since arrays need initialization, .NET will not allow this in a variant type record.
I wonder what initialization *static* arrays require?
Same as dynamic ones.
As can be seen from sizeof() of
TTest = record
buf: array [0..3] of byte;
end;
no additional information is part of the record. So what the heck is that information, that is pretended to need initialization???
That record actually has a number of methods. One of them is named __Initialize__, and it's implemented like this:
procedure TTest1.__Initialize__;
begin
self.buf := New(array[4] of Byte)
end;
That's the way Reflector shows the code, anyway.
--
Rob
.
- Follow-Ups:
- Re: Delphi.NET
- From: Hans-Peter Diettrich
- Re: Delphi.NET
- References:
- Delphi.NET
- From: Daniel Hobson
- Re: Delphi.NET
- From: Tom de Neef
- Re: Delphi.NET
- From: Daniel Hobson
- Re: Delphi.NET
- From: Hans-Peter Diettrich
- Delphi.NET
- Prev by Date: Re: Delphi.NET
- Next by Date: Re: Delphi.NET
- Previous by thread: Re: Delphi.NET
- Next by thread: Re: Delphi.NET
- Index(es):
Relevant Pages
|