home *** CD-ROM | disk | FTP | other *** search
/ Programmer 7500 / MAX_PROGRAMMERS.iso / PASCAL / BIX03.ZIP / CBENCH.PAS < prev    next >
Encoding:
Pascal/Delphi Source File  |  1986-08-04  |  744 b   |  35 lines

  1. {       TITLE: File Copy BenchMark}
  2.  
  3. (*$u-,n+*)
  4. program copytext;
  5.  
  6. var destination,source:text;
  7.     symbol:char;
  8.     charcount:integer;
  9.  
  10. begin
  11.      write('Press return to start: '); readln;
  12.  
  13.      charcount:=0;
  14.      reset(source,'#4:sieve.text');
  15.      rewrite(destination,'#4:junk.text');
  16.  
  17.      while not eof(source) do
  18.      begin
  19.           while not eoln(source) do
  20.           begin
  21.                read(source,symbol);
  22.                write(destination,symbol);
  23.                charcount := charcount+1;
  24.           end;
  25.           readln(source);
  26.           writeln(destination);
  27.      end;
  28.  
  29.      close(source);
  30.      close(destination,lock);
  31.  
  32.      writeln(charcount,' chars copied.');
  33.      writeln('Finished.');
  34. end.
  35.