>   TClientRec = Record
>      FileKey                : longint;
>      DateOfBirth            : TDateTime;
>    End;

> Edit1.Text:= IntToStr(SizeOf(ClientRec));
>In D4 Edit1.Text will show 12, whereas in D5 it shows 16. I can't
>find any documentation in D5 which indicates that there has been
>any change in the storage size of either the LongInt or TDateTime types.

>I believe that the problem lies with the TDateTime variable as the
>LongInt is returning the correct value in the debugger and the date
>variables are not.

>The problem is somewhat more complex than this simple example as
> the real record structure has a size of 140732 under D4 and 140752
> under D5, and it only contains 2 TDateTime variables.

I would suggest the following

1. try to get more info on field sizes.
    ShowMessage(format(
        '%d+%d = %d',[SizeOf(Integer),SizeOf(TDateTime),SizeOf(ClientRec)]);
2. I wonder if Integers are being stored as 64 bits.  that's your extra 4 bytes...
    Does the 'real' ClientRec have 5 integers in it.
3. Is one implementation with WordAligned data and the other not... IE are there
    padding bytes involved in the new record (shouldn't be for LongInt and TDateTime
    though AFAIK).

--
Aaron Scott-Boddendijk
Jump Productions
(07) 838-3371 Voice
(07) 838-3372 Fax


---------------------------------------------------------------------------
    New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
                  Website: http://www.delphi.org.nz

Reply via email to