| 12345678910111213141516171819202122232425262728293031323334 |
- program t94_textread;
- { t94 -- text-file Eof and Readln. CALC.INC's GetPages does
- while not Eof(H) do
- Readln(H, Buffer^[count]);
- and then reads back string elements from the pointer. Compile-only: the
- boot harnesses have no filesystem, so a successful text read has no oracle
- here. }
- type
- Pages = array [0..2] of string[5];
- var
- H : text;
- P : ^Pages;
- C : integer;
- S : string[5];
- begin
- New (P);
- assign (H, 'T94.TXT');
- reset (H);
- C := 0;
- while not Eof (H) do
- begin
- Readln (H, P^[C]);
- C := C + 1
- end;
- close (H);
- S := P^[0];
- writeln (S);
- Dispose (P)
- end.
|