ex6.pp 319 B

1234567891011121314151617
  1. Program Example6;
  2. Uses strings;
  3. { Program to demonstrate the StrECopy function. }
  4. Const P : PChar = 'This is a PCHAR string.';
  5. Var PP : PChar;
  6. begin
  7. PP:=StrAlloc (StrLen(P)+1);
  8. If Longint(StrECopy(PP,P))-Longint(PP)<>StrLen(P) then
  9. Writeln('Something is wrong here !')
  10. else
  11. Writeln ('PP= ',PP);
  12. end.