If your statements were true, the array elements would be packed and array size would be 6. But it's not. It is equal to 8, because packed refers only to the array. But if add "packed" before "record" in the definition, only then array size turn to 6.
The statement is true, the problem is that prefixing an array with "packed" has an effect
only on some, not all, types. In the case of FPC specifically, if {$bitpacking ON} is in effect _and_ the type is Boolean, then the modifier "packed" will do something, otherwise it won't.
As the first example I posted showed, "packed" is, in most cases, completely ignored. with the exception of Boolean (in the case of FPC), if the programmer wants the type to be packed, then the programmer has to include "packed" in the
type definition, specifying it in front of "array" won't do anything (again, except in the case of Boolean, which seems to be the only exception.)
This can be shown with a small addition to the example you posted
{$APPTYPE CONSOLE}
{$ALIGN ON}
var
A: packed array[0..1] of record
W: Word;
X: Byte;
end;
B : array[0..1] of packed record
W : word;
X : byte;
end;
begin
Writeln('A: ', SizeOf(A));
writeln('B: ', sizeof(B));
Readln;
end.
You can comment/uncomment the ALIGN directive, the result will be the same. "packed" in front of "array" has no effect whatsoever on, neither, the array or the elements of the array (but, it would affect the type
if the type was Boolean, which seems to be the only exception and only when bitpacking is on.)
The important thing is, even when "packed" does something, it does not alter the way elements are arranged in the array, it only alters the representation of the stored type (yet again, in the case of FPC, only if the array's target type is Boolean, otherwise it does nothing.)
HTH.