2
0

ex35.pp 491 B

12345678910111213141516171819
  1. Program Example35;
  2. { This program demonstrates the ExtractRelativePath function }
  3. Uses sysutils;
  4. Procedure Testit (FromDir,ToDir : String);
  5. begin
  6. Write ('From "',FromDir,'" to "',ToDir,'" via "');
  7. Writeln (ExtractRelativePath(FromDir,ToDir),'"');
  8. end;
  9. Begin
  10. Testit ('/pp/src/compiler','/pp/bin/win32/ppc386');
  11. Testit ('/pp/bin/win32/ppc386','/pp/src/compiler');
  12. Testit ('e:/pp/bin/win32/ppc386','d:/pp/src/compiler');
  13. Testit ('e:\pp\bin\win32\ppc386','d:\pp\src\compiler');
  14. End.