[fpc-devel] SizeOf( const typcasted as shortstring)

Bart bartjunk64 at gmail.com
Sun Aug 12 23:40:12 CEST 2018


Hi,

This came up in http://forum.lazarus.freepascal.org/index.php/topic,42179.0.html

const
  x = ShortString('abc');
begin
  writeln(SizeOf(x));
end.

Delphi (7) prints 256, fpc prints 3.

Is that a bug or an implementation detail?

Just curious.

Bart



More information about the fpc-devel mailing list