Добавил:
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Скачиваний:
24
Добавлен:
10.12.2013
Размер:
837 б
Скачать
(**************************************************************************
** This program copies characters from the input file to the standard output
**
** Syntax: ivm type2 in
**    where 'in' is the name of the input file.
*)
program type2(output);
var
   f : text;
   c : char;
begin
   if paramcount <> 1 then
      begin
         writeln('Types the contents of the input file to the standard output');
         writeln('Syntax:     ivm type2 in');
         writeln('where ''in'' is the input file');
         halt
      end;
   assign(f, paramstr(1));
   reset(f);            (* Open 'in' *)
   while not eof(f) do
      if eoln(f) then
         begin
            readln(f);
            writeln
         end
      else
         begin
            read(f, c);
            write(c)
         end
end.
Соседние файлы в папке samples