mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-22 00:09:25 +02:00
* new bug
This commit is contained in:
parent
535cb78569
commit
6ac192fcbb
31
tests/webtbs/tw3533.pp
Normal file
31
tests/webtbs/tw3533.pp
Normal file
@ -0,0 +1,31 @@
|
||||
{ Source provided for Free Pascal Bug Report 3533 }
|
||||
{ Submitted by "Vasily Volchenko" on 2005-01-08 }
|
||||
{ e-mail: Vasily.Volchenko@mstu.edu.ru }
|
||||
program Bug;
|
||||
|
||||
{x$mode objfpc}{x$H+}
|
||||
//Local function bug
|
||||
uses
|
||||
Classes,Math,SysUtils;
|
||||
procedure p1;
|
||||
var tc,t0:double;
|
||||
s1,s2,s3 : string;
|
||||
function Theta(x:double):double;
|
||||
begin
|
||||
{Result}Theta:=(x-tc)/(t0-tc);
|
||||
end;
|
||||
begin
|
||||
tc:=0;t0:=20;
|
||||
str(theta(20),s1);
|
||||
str(theta(2),s2);
|
||||
str(theta(20)-theta(2),s3);
|
||||
writeln(s1,' ',s2,' ',s3);
|
||||
if (s1<>' 1.000000000000000E+000') or
|
||||
(s2<>' 1.000000000000000E-001') or
|
||||
(s3<>'-9.000000000000000E-001') then
|
||||
halt(1);
|
||||
end;
|
||||
begin
|
||||
p1;
|
||||
end.
|
||||
|
Loading…
Reference in New Issue
Block a user