mirror of
				https://gitlab.com/freepascal.org/fpc/source.git
				synced 2025-10-31 23:30:39 +01:00 
			
		
		
		
	
		
			
				
	
	
		
			15 lines
		
	
	
		
			287 B
		
	
	
	
		
			ObjectPascal
		
	
	
	
	
	
			
		
		
	
	
			15 lines
		
	
	
		
			287 B
		
	
	
	
		
			ObjectPascal
		
	
	
	
	
	
| program Example31;
 | |
| 
 | |
| { Program to demonstrate the Dup function. }
 | |
| 
 | |
| uses linux;
 | |
| 
 | |
| var f : text;
 | |
| 
 | |
| begin
 | |
|   if not dup (output,f) then 
 | |
|     Writeln ('Dup Failed !');
 | |
|   writeln ('This is written to stdout.');
 | |
|   writeln (f,'This is written to the dup file, and flushed');flush(f);
 | |
|   writeln
 | |
| end. | 
