mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-04 14:33:21 +02:00
+ added
This commit is contained in:
parent
9879f684d2
commit
04d9bb1bfb
25
tests/webtbs/tw2296.pp
Normal file
25
tests/webtbs/tw2296.pp
Normal file
@ -0,0 +1,25 @@
|
||||
uses Dos;
|
||||
|
||||
const MAX_VAL = 128;
|
||||
var
|
||||
r : real;
|
||||
f : file of byte;
|
||||
b1, b2: byte;
|
||||
begin
|
||||
assign(f,'bug2296.dat');
|
||||
rewrite(f);
|
||||
r := 12.2;
|
||||
write(f,Byte(round(sin(r)*(MAX_VAL-1)+MAX_VAL)));
|
||||
b1 := Byte(round(sin(r)*(MAX_VAL-1)+MAX_VAL));
|
||||
close(f);
|
||||
reset(f);
|
||||
read(f,b2);
|
||||
if b1 <> b2 then
|
||||
begin
|
||||
writeln('b1: ',b1,' <> b2: ',b2);
|
||||
halt(1);
|
||||
end;
|
||||
close(f);
|
||||
erase(f);
|
||||
end.
|
||||
|
Loading…
Reference in New Issue
Block a user