mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-07 11:08:02 +02:00
24 lines
305 B
ObjectPascal
24 lines
305 B
ObjectPascal
{ %interactive }
|
|
|
|
{ run in gdb, "print a.a7" when reaching the writeln and
|
|
check that the output is 8
|
|
}
|
|
|
|
{$mode objfpc}
|
|
|
|
type
|
|
ta = class
|
|
private
|
|
fa: array[6..10] of byte;
|
|
public
|
|
property a7: byte read fa[7];
|
|
end;
|
|
|
|
var
|
|
a: ta;
|
|
begin
|
|
a:=ta.create;
|
|
a.fa[7]:=8;
|
|
writeln(a.a7);
|
|
end.
|