ex4.pp 313 B

123456789101112131415161718
  1. Program Example4;
  2. Uses strings;
  3. { Program to demonstrate the StrCopy function. }
  4. Const P : PCHar = 'This is a PCHAR string.';
  5. var PP : PChar;
  6. begin
  7. PP:=StrAlloc(Strlen(P)+1);
  8. STrCopy (PP,P);
  9. If StrComp (PP,P)<>0 then
  10. Writeln ('Oh-oh problems...')
  11. else
  12. Writeln ('All is well : PP=',PP);
  13. end.