File:  [CSRG BSD Unix] / 43BSDReno / pgrm / pascal / tstpx / src / numericio.p
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs
Tue Apr 24 16:12:57 2018 UTC (8 years, 1 month ago) by root
Branches: MAIN, BSD
CVS tags: HEAD, BSD43reno
BSD 4.3reno

program numericIO(f,output);
  const n = 500; d = 0.12345;
  var i: integer; x,s: real;
      f: file of real;
begin writeln(wallclock);
  x := 1.0; s := 0; rewrite(f);
  for i := 1 to n do
    begin write(f,x); s := s+x; x := x+d
    end ;
  writeln(wallclock, s);
  reset(f); s := 0;
  while not eof(f) do
    begin read(f,x); s := s+x
    end ;
  writeln(wallclock, s)
end .

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.