tbs0238.pp 549 B

1234567891011121314151617181920212223242526272829303132333435
  1. program test1;
  2. {compiles under TPC - PPC386 gives internal error}
  3. Type str1=string[160];
  4. var
  5. fileof :file of str1;
  6. lol :array[1..8] of str1;
  7. nu,n:integer;
  8. i,tt :str1;
  9. ul :text;
  10. a: str1;
  11. procedure test;
  12. begin
  13. for nu:=1 to 8 do read(fileof,lol[nu]);
  14. writeln('File contents');
  15. for nu:=4 to 8 do writeln(lol[nu]);
  16. end;
  17. begin
  18. assign(fileof,'test.dat');
  19. rewrite(fileof);
  20. a:='dummy string !!';
  21. for nu:=1 to 8 do write(fileof,a);
  22. close(fileof);
  23. reset(fileof);
  24. test;
  25. close(fileof);
  26. end.