|
|
1.1 ! root 1: program test(input, output, testfile); ! 2: var ! 3: testfile: text; ! 4: i, j, repetitions: integer; ! 5: begin ! 6: rewrite(testfile); ! 7: write(output, 'Number: '); ! 8: readln(repetitions); ! 9: for i:=1 to repetitions do ! 10: writeln(testfile, i); ! 11: reset(testfile); ! 12: for i:=1 to repetitions do begin ! 13: read(testfile, j); ! 14: if j <> i then ! 15: writeln('read/write error'); ! 16: end; ! 17: readln(testfile); ! 18: if not eof(testfile) then ! 19: writeln('eof not reached'); ! 20: remove('testfile'); ! 21: end.
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.