ex2.pp 271 B

1234567891011121314151617
  1. Program Example2;
  2. Uses strings;
  3. { Program to demonstrate the StrPCopy function. }
  4. Const S = 'This is a normal string.';
  5. Var P : Pchar;
  6. begin
  7. p:=StrAlloc (length(S)+1);
  8. if StrPCopy (P,S)<>P then
  9. Writeln ('This is impossible !!')
  10. else
  11. writeln (P);
  12. end.