Re: Delphi.NET



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?

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???

DoDi
.



Relevant Pages

  • Re: Delphi.NET
    ... Since arrays need initialization, .NET will not allow this in a variant type record. ... TTest = record ...
    (comp.lang.pascal.delphi.misc)
  • Re: How does this sizeof(*area) work?
    ... > The sizeof automagically adapts to allocating space for the new type. ... Normally, any use of *x in the initialization of x would be Very Bad, ... BTW, the inner parentheses aren't strictly necessary, though they're ... Some might prefer to use the parentheses because the latter form looks ...
    (comp.lang.c)