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

  1. Program Example12;
  2.  
  3. Uses strings;
  4.  
  5. { Program to demonstrate the StrLCat function. }
  6.  
  7. Const P1 : PChar = '1234567890';
  8.  
  9. Var P2 : PChar;
  10.  
  11. begin
  12.   P2:=StrAlloc (StrLen(P1)*2+1);
  13.   P2^:=#0; { Zero length }
  14.   StrCat (P2,P1);
  15.   StrLCat (P2,P1,5); 
  16.   Writeln ('P2 = ',P2);
  17. end.
  18.