mirror of
https://git.sr.ht/~rabbits/macintosh_cookbook
synced 2024-12-27 10:29:25 +00:00
24 lines
312 B
ObjectPascal
24 lines
312 B
ObjectPascal
program ExampleFileRead;
|
|
|
|
procedure ReadFile;
|
|
var
|
|
i: Integer;
|
|
data: string;
|
|
infile: Text;
|
|
begin
|
|
i := 0;
|
|
Open(infile, OldFileName('Open txt file?'));
|
|
repeat
|
|
i := i + 1;
|
|
Readln(infile, data);
|
|
Writeln(data);
|
|
until eof(infile);
|
|
Reset(infile);
|
|
end;
|
|
|
|
begin
|
|
|
|
ShowText;
|
|
ReadFile;
|
|
|
|
end. |