mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-13 00:49:31 +02:00
39 lines
522 B
ObjectPascal
39 lines
522 B
ObjectPascal
{ %OPT=-gh }
|
|
Program project1;
|
|
|
|
{$mode objfpc}
|
|
{$h+}
|
|
|
|
type
|
|
trec = record
|
|
s: string;
|
|
end;
|
|
|
|
procedure test1(values: array of string);
|
|
begin
|
|
if paramcount = 0 then
|
|
values[0] := values[0] + '1'
|
|
else
|
|
values[0] := '1';
|
|
end;
|
|
|
|
|
|
procedure test2(values: array of trec);
|
|
begin
|
|
if paramcount = 0 then
|
|
values[0].s := values[0].s + '1'
|
|
else
|
|
values[0].s := '1';
|
|
end;
|
|
|
|
var
|
|
tr: trec;
|
|
|
|
begin
|
|
HaltOnNotReleased := True;
|
|
tr.s := 'test';
|
|
uniquestring(tr.s);
|
|
test1([tr.s]);
|
|
test2([tr]);
|
|
end.
|