Delphi is probably doing some alignment
Check under Project | Options
Aligned record fields: Aligns elements in structures to 32-bit
boundaries. Corresponds to {$A}.
Or Define your Records as "Packed" this will turn the Alignment for the Record
Off
HTH
Paul
____________________Reply Separator____________________
Subject: [DUG]: Size of Integer
Author: [EMAIL PROTECTED]
Date: 07/03/2001 13:48
What is wrong here ? I have some records which I have converted from C
structures.
Some of the Variables in the Record are of size 4 byte which I assumed to
be
an Integer under Delphi.
However, if I have these variables as Integers, the record size is too big.
If I have them as :
TRecord = Record
SomeVariable : Array[1..4] of Byte;
end;
It works fine......
Also if I have to do above, how do I calculate the integer value of the
array of Bytes.
Cheers
CAUTION - This message may contain privileged and confidential information
intended only for the
use of the addressee(s) named above. If you are not the intended recipient
of this message you are
hereby notified that any use, dissemination, distribution or reproduction
of this message is prohibited.
If you have received this message in error please notify Progressive
Enterprises Ltd. immediately via
email at [EMAIL PROTECTED] Any views expressed in this
message are those of the
individual sender and may not necessarily reflect the views of Progressive
Enterprises Ltd.
This footnote also confirms that Progressive Enterprises Ltd. has swept
this email message for the
presence of computer viruses. This does not guarantee this message is
virus free.
---------------------------------------------------------------------------
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"(See attached file: att1.eml)
att1.eml