My guess is that the array elements are being aligned on word boundaries.
Grant
At 9:25 PM +0300 31/1/03, Ingvar Marny wrote:
Hi All.
program test;
type
  t1 = packed record
    item1 : byte;
    item2: byte;
    item3: byte;
  end;
  t2 = packed array [0..0] of t1;
begin
  writeln ('SizeOf (t1): ', SizeOf (t1));
  writeln ('SizeOf (t2): ', SizeOf (t2)); 
  readln;
end.
Output of program:
SizeOf (t1): 3
SizeOf (t2): 4
Could anybody tell me - why?
Thanks.
software:
gpc version 2.1 (20020510), based on 2.95.3 20010315 (release)
Linux RedHat 2.5.52
-- 
-------------------------------------------------------------------
Grant Jacobs Ph.D.                                     BioinfoTools
ph. +64 3 476 1820  (office, after 10am)               PO Box 6129,
or  +64 25 601 5917 (mobile)                               Dunedin,
gjacobs@bioinfotools.com                               NEW ZEALAND.
    Bioinformatics tools: deriving knowledge from biological data
Bioinformatics tools - software development - consulting - training
Check out the website for more details: 
http://www.bioinfotools.com
The information contained in this mail message is  confidential and
may  be legally privileged. Readers of this message who are not the
intended recipient 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 the sender immed-
iately and destroy the original message.  This applies also to  any
attached documents.