ex10.pp 265 B

12345678910111213141516
  1. Program Example10;
  2. Uses strings;
  3. { Program to demonstrate the StrMove function. }
  4. Const P1 : PCHAR = 'This is a pchar string.';
  5. Var P2 : Pchar;
  6. begin
  7. P2:=StrAlloc(StrLen(P1)+1);
  8. StrMove (P2,P1,StrLen(P1)+1); { P2:=P1 }
  9. Writeln ('P2 = ',P2);
  10. end.