mirror of
				https://gitlab.com/freepascal.org/fpc/source.git
				synced 2025-10-29 17:45:04 +01:00 
			
		
		
		
	
		
			
				
	
	
		
			18 lines
		
	
	
		
			271 B
		
	
	
	
		
			ObjectPascal
		
	
	
	
	
	
			
		
		
	
	
			18 lines
		
	
	
		
			271 B
		
	
	
	
		
			ObjectPascal
		
	
	
	
	
	
| Program Example2;
 | |
| 
 | |
| Uses strings;
 | |
| 
 | |
| { Program to demonstrate the StrPCopy function. }
 | |
| 
 | |
| Const S = 'This is a normal string.';
 | |
| 
 | |
| Var P : Pchar;
 | |
| 
 | |
| begin
 | |
|   p:=StrAlloc (length(S)+1);
 | |
|   if StrPCopy (P,S)<>P then 
 | |
|     Writeln ('This is impossible !!')
 | |
|   else
 | |
|     writeln (P);
 | |
| end.
 | 
