1: program filetest(input, output, testfile); 2: var testfile : text; 3: begin 4: writeln('opening testfile'); 5: rewrite(testfile); 6: writeln(testfile, 'all done'); 7: end.