mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-21 13:29:28 +02: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. |