home *** CD-ROM | disk | FTP | other *** search
- { TITLE: File Copy BenchMark}
-
- (*$u-,n+*)
- program copytext;
-
- var destination,source:text;
- symbol:char;
- charcount:integer;
-
- begin
- write('Press return to start: '); readln;
-
- charcount:=0;
- reset(source,'#4:sieve.text');
- rewrite(destination,'#4:junk.text');
-
- while not eof(source) do
- begin
- while not eoln(source) do
- begin
- read(source,symbol);
- write(destination,symbol);
- charcount := charcount+1;
- end;
- readln(source);
- writeln(destination);
- end;
-
- close(source);
- close(destination,lock);
-
- writeln(charcount,' chars copied.');
- writeln('Finished.');
- end.
-