|
|
1.1 ! root 1: {TEST 6.6.5.2-2, CLASS=ERRORHANDLING} ! 2: ! 3: { This program causes an error to occur as eof(f) does ! 4: not yield false prior to execution of a get on the file f. ! 5: The error should be detected at compile-time or run-time. } ! 6: ! 7: program t6p6p5p2d2(output); ! 8: var ! 9: fyle : text; ! 10: begin ! 11: rewrite(fyle); ! 12: writeln(fyle,'ABC'); ! 13: reset(fyle); ! 14: get(fyle); { fyle^='A' } ! 15: get(fyle); { fyle^='B' } ! 16: get(fyle); { fyle^='C' } ! 17: get(fyle); { fyle^ undefined...eof is true } ! 18: get(fyle); { error since eof is true } ! 19: writeln(' ERROR NOT DETECTED...6.6.5.2-2') ! 20: end.
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.