pascalabcnet/TestSuite/setlength1.pas

14 lines
222 B
ObjectPascal
Raw Permalink Normal View History

2015-05-14 22:35:07 +03:00
type TRec = record
s : string;
end;
var arr : array of TRec;
begin
SetLength(arr,Length(arr)+1);
assert(Length(arr)=1);
2016-11-13 17:14:33 +03:00
assert(arr[0].s='');
arr[0].s := 'abc';
SetLength(arr,Length(arr)+1);
assert(arr[0].s='abc');
2015-05-14 22:35:07 +03:00
end.