mirror of
				https://gitlab.com/freepascal.org/fpc/source.git
				synced 2025-10-31 10:31:44 +01:00 
			
		
		
		
	
		
			
				
	
	
		
			19 lines
		
	
	
		
			370 B
		
	
	
	
		
			ObjectPascal
		
	
	
	
	
	
			
		
		
	
	
			19 lines
		
	
	
		
			370 B
		
	
	
	
		
			ObjectPascal
		
	
	
	
	
	
| Program Example30;
 | |
| 
 | |
| { This program demonstrates the ChangeFileExt function }
 | |
| 
 | |
| Uses sysutils;
 | |
| 
 | |
| Procedure testit (N,E : String);
 | |
| 
 | |
| begin
 | |
|   Write ('Changing "',n,'" with extension "',e,'" : ');
 | |
|   Writeln (ChangeFileExt(N,E));
 | |
| end;
 | |
| 
 | |
| Begin
 | |
|   Testit ('report.txt','.pas');
 | |
|   Testit ('file','.txt');
 | |
|   Testit ('/path/file.pas','.pp');
 | |
|   Testit ('/path/file.pp.org','.new');
 | |
| End. | 
