{*************************************************************** Elementary file typer. Accepts a single file parameter, and copies this to the output. ***************************************************************} program ty(source, { file to read from (existing) } output); { print on standard output } var source: text; { source file } c: char; { a buffer } begin reset(source); { open file } while not eof(source) do begin { read lines } while not eoln(source) do begin { read characters } read(source, c); { get a character } write(c) { print } end; readln(source); { next line from input } writeln { next line to output } end end.