{$T+} program compare; var count,high:integer; file1,file2:file of char; const nl=chr(10); procedure increment(var count,high:integer); begin count := succ(count); if count = 10000 then begin count := 0; high := succ(high) end; end; begin reset(file1,argv[1]@); reset(file2,argv[2]@); count := 0; high := 0; while not eof(file1) do begin if file1@ <> file2@ then write(output,nl,'Error at ',high,' ',count,' file1=',ord(file1@), ' file2=',ord(file2@)); get(file1); get(file2); increment(count,high) end; if not eof(file2) then write(output,nl,'Files not same length'); break(output) end.