mirror of
				https://gitlab.com/freepascal.org/fpc/source.git
				synced 2025-11-04 04:22:07 +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.
 |