mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-07 11:08:02 +02:00

final destination may also be used in the other arguments (mantis #20744) git-svn-id: trunk@19678 -
45 lines
623 B
ObjectPascal
45 lines
623 B
ObjectPascal
{ %opt=-gh }
|
|
|
|
program tt;
|
|
|
|
type
|
|
pstring = ^string;
|
|
var
|
|
s: string;
|
|
ps: pstring;
|
|
as: ansistring;
|
|
us: unicodestring;
|
|
ws: widestring;
|
|
begin
|
|
HaltOnNotReleased := true;
|
|
s:='abc';
|
|
ps:=@s;
|
|
writestr(s,ps^,1,s,2,s);
|
|
writeln(s);
|
|
if s<>'abc1abc2abc' then
|
|
halt(1);
|
|
|
|
as:='de';
|
|
as:=as+'f';
|
|
writestr(as,as,3,as,4,as);
|
|
writeln(as);
|
|
if as<>'def3def4def' then
|
|
halt(2);
|
|
|
|
|
|
us:='de';
|
|
us:=us+'f';
|
|
writestr(us,us,3,us,4,us);
|
|
writeln(as);
|
|
if us<>'def3def4def' then
|
|
halt(3);
|
|
|
|
|
|
ws:='de';
|
|
ws:=ws+'f';
|
|
writestr(ws,ws,3,ws,4,ws);
|
|
writeln(ws);
|
|
if ws<>'def3def4def' then
|
|
halt(4);
|
|
end.
|