home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus 2000 #5 / Amiga Plus CD - 2000 - No. 5.iso / Tools / Dev / fpc / source / docs / stringex / ex4.pp < prev    next >
Encoding:
Text File  |  2000-01-01  |  313 b   |  19 lines

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