{*************************************************************** Elementary file typer with line numbers. Accepts a single file parameter, and copies this to the output. Outputs the line number at the start of each line. ***************************************************************} program tl(input, output); var c: char; { a buffer } lc: 0..maxint; { count of lines } begin lc := 1; { set first line } while not eof do begin { read lines } write(lc:10, ': '); { output line number } while not eoln do begin { read characters } read(c); { get a character } write(c) { print } end; readln; { next line from input } writeln; { next line to output } lc := lc+1 { find next line } end end.