Добавил:
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Скачиваний:
20
Добавлен:
10.12.2013
Размер:
720 б
Скачать
//***************************************************
// This program lists all the files ending with .pas
// in the current diectory using the built-in
// procedure "exec".
// Basically the program determines whether it is running
// under a Unix-like platform or not and passes
// the approprate list command to "exec" along
// with the "*.pas" argument so that only files
// ending with .pas are listed.
program dirpas(output);
const
UnixListCommand = 'ls -l';
OtherListCommand = 'dir';

begin
if UnixPlatform then
exec(UnixListCommand, '*.pas')
else
exec(OtherListCommand, '*.pas');
if exitcode <> 0 then
writeln('Error listing directory', exitcode)
end.
Соседние файлы в папке samples