home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
minnie.tuhs.org
/
unixen.tar
/
unixen
/
PDP-11
/
Distributions
/
ucb
/
spencer_2bsd.tar.gz
/
2bsd.tar
/
src
/
pascal
/
tests
/
numericio.p
< prev
next >
Wrap
Text File
|
1980-02-17
|
378b
|
17 lines
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 .