ex11.pp 314 B

12345678910111213141516
  1. Program Example11;
  2. Uses strings;
  3. { Program to demonstrate the StrCat function. }
  4. Const P1 : PChar = 'This is a PChar String.';
  5. Var P2 : PChar;
  6. begin
  7. P2:=StrAlloc (StrLen(P1)*2+1);
  8. StrMove (P2,P1,StrLen(P1)+1); { P2=P1 }
  9. StrCat (P2,P1); { Append P2 once more }
  10. Writeln ('P2 : ',P2);
  11. end.