mirror of
				https://gitlab.com/freepascal.org/fpc/source.git
				synced 2025-10-31 04:11:35 +01:00 
			
		
		
		
	
		
			
				
	
	
		
			18 lines
		
	
	
		
			271 B
		
	
	
	
		
			ObjectPascal
		
	
	
	
	
	
			
		
		
	
	
			18 lines
		
	
	
		
			271 B
		
	
	
	
		
			ObjectPascal
		
	
	
	
	
	
| Program Example16;
 | |
| 
 | |
| Uses strings;
 | |
| 
 | |
| { Program to demonstrate the StrNew function. }
 | |
| 
 | |
| Const P1 : PChar = 'This is a PChar string';
 | |
| 
 | |
| var P2 : PChar;
 | |
| 
 | |
| begin
 | |
|   P2:=StrNew (P1);
 | |
|   If P1=P2 then 
 | |
|     writeln ('This can''t be happening...')
 | |
|   else
 | |
|     writeln ('P2 : ',P2);
 | |
| end.
 | 
