mirror of
				https://gitlab.com/freepascal.org/fpc/source.git
				synced 2025-10-31 11:31:39 +01:00 
			
		
		
		
	
		
			
				
	
	
		
			19 lines
		
	
	
		
			491 B
		
	
	
	
		
			ObjectPascal
		
	
	
	
	
	
			
		
		
	
	
			19 lines
		
	
	
		
			491 B
		
	
	
	
		
			ObjectPascal
		
	
	
	
	
	
| Program Example35;
 | |
| 
 | |
| { This program demonstrates the ExtractRelativePath function }
 | |
| 
 | |
| Uses sysutils;
 | |
| 
 | |
| Procedure Testit (FromDir,ToDir : String);
 | |
| 
 | |
| begin
 | |
|   Write ('From "',FromDir,'" to "',ToDir,'" via "');
 | |
|   Writeln (ExtractRelativePath(FromDir,ToDir),'"');
 | |
| end;
 | |
| 
 | |
| Begin
 | |
|  Testit ('/pp/src/compiler','/pp/bin/win32/ppc386');
 | |
|  Testit ('/pp/bin/win32/ppc386','/pp/src/compiler');
 | |
|  Testit ('e:/pp/bin/win32/ppc386','d:/pp/src/compiler');
 | |
|  Testit ('e:\pp\bin\win32\ppc386','d:\pp\src\compiler');
 | |
| End. | 
