mirror of
				https://gitlab.com/freepascal.org/fpc/source.git
				synced 2025-10-31 02:51:37 +01:00 
			
		
		
		
	
		
			
				
	
	
		
			14 lines
		
	
	
		
			212 B
		
	
	
	
		
			ObjectPascal
		
	
	
	
	
	
			
		
		
	
	
			14 lines
		
	
	
		
			212 B
		
	
	
	
		
			ObjectPascal
		
	
	
	
	
	
| Program Example59;
 | |
| 
 | |
| { Program to demonstrate the Ptr function. }
 | |
| 
 | |
| Var P : ^String;
 | |
|     S : String;
 | |
|     
 | |
| begin
 | |
|   S:='Hello, World !';
 | |
|   P:=Ptr(Seg(S),Longint(Ofs(S)));
 | |
|   {P now points to S !}
 | |
|   Writeln (P^);
 | |
| end.
 | 
