mirror of
				https://gitlab.com/freepascal.org/fpc/source.git
				synced 2025-10-31 13:31:40 +01:00 
			
		
		
		
	
		
			
				
	
	
		
			17 lines
		
	
	
		
			354 B
		
	
	
	
		
			ObjectPascal
		
	
	
	
	
	
			
		
		
	
	
			17 lines
		
	
	
		
			354 B
		
	
	
	
		
			ObjectPascal
		
	
	
	
	
	
| Program ex11;
 | |
| 
 | |
| { Program to demonstrate the TStream.GetPos function }
 | |
| 
 | |
| Uses objects;
 | |
| 
 | |
| Var L : String;
 | |
|     S : PStream;
 | |
|     
 | |
| begin
 | |
|   L:='Some kind of string';
 | |
|   S:=New(PMemoryStream,Init(100,10));
 | |
|   Writeln ('Stream position before write: ',S^.GetPos);
 | |
|   S^.WriteStr(@L);
 | |
|   Writeln ('Stream position after write : ',S^.GetPos);
 | |
|   Dispose(S,Done);
 | |
| end.     | 
