mirror of
				https://gitlab.com/freepascal.org/fpc/source.git
				synced 2025-10-31 12:31:38 +01:00 
			
		
		
		
	
		
			
				
	
	
		
			18 lines
		
	
	
		
			271 B
		
	
	
	
		
			ObjectPascal
		
	
	
	
	
	
			
		
		
	
	
			18 lines
		
	
	
		
			271 B
		
	
	
	
		
			ObjectPascal
		
	
	
	
	
	
| Program Example12;
 | |
| 
 | |
| Uses strings;
 | |
| 
 | |
| { Program to demonstrate the StrLCat function. }
 | |
| 
 | |
| Const P1 : PChar = '1234567890';
 | |
| 
 | |
| Var P2 : PChar;
 | |
| 
 | |
| begin
 | |
|   P2:=StrAlloc (StrLen(P1)*2+1);
 | |
|   P2^:=#0; { Zero length }
 | |
|   StrCat (P2,P1);
 | |
|   StrLCat (P2,P1,5); 
 | |
|   Writeln ('P2 = ',P2);
 | |
| end.
 | 
