ex12.pp 271 B

1234567891011121314151617
  1. Program Example12;
  2. Uses strings;
  3. { Program to demonstrate the StrLCat function. }
  4. Const P1 : PChar = '1234567890';
  5. Var P2 : PChar;
  6. begin
  7. P2:=StrAlloc (StrLen(P1)*2+1);
  8. P2^:=#0; { Zero length }
  9. StrCat (P2,P1);
  10. StrLCat (P2,P1,5);
  11. Writeln ('P2 = ',P2);
  12. end.