ex30.pp 370 B

12345678910111213141516171819
  1. Program Example30;
  2. { This program demonstrates the ChangeFileExt function }
  3. Uses sysutils;
  4. Procedure testit (N,E : String);
  5. begin
  6. Write ('Changing "',n,'" with extension "',e,'" : ');
  7. Writeln (ChangeFileExt(N,E));
  8. end;
  9. Begin
  10. Testit ('report.txt','.pas');
  11. Testit ('file','.txt');
  12. Testit ('/path/file.pas','.pp');
  13. Testit ('/path/file.pp.org','.new');
  14. End.