home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.ee.pdx.edu
/
2014.02.ftp.ee.pdx.edu.tar
/
ftp.ee.pdx.edu
/
pub
/
users
/
Harry
/
compilers
/
p11
/
tst
/
goto3.pcat
< prev
next >
Wrap
Text File
|
2006-03-05
|
2KB
|
104 lines
(* This routine tests floating point conditional gotos *)
program is
var x: real := 1.1;
y: real := 2.2;
begin
write ("SHOULD PRINT ALL OKS AFTER EACH TEST:");
write ("TESTING =...");
if x=y then
write (" ERROR");
else
write (" OK");
end;
if x=x then
write (" OK");
else
write (" ERROR");
end;
write ("TESTING <>...");
if x<>y then
write (" OK");
else
write (" ERROR");
end;
if x<>x then
write (" ERROR");
else
write (" OK");
end;
write ("TESTING <...");
if x<x then
write (" ERROR");
else
write (" OK");
end;
if y<x then
write (" ERROR");
else
write (" OK");
end;
if x<y then
write (" OK");
else
write (" ERROR");
end;
write ("TESTING >...");
if x>x then
write (" ERROR");
else
write (" OK");
end;
if y>x then
write (" OK");
else
write (" ERROR");
end;
if x>y then
write (" ERROR");
else
write (" OK");
end;
write ("TESTING <=...");
if x<=x then
write (" OK");
else
write (" ERROR");
end;
if y<=x then
write (" ERROR");
else
write (" OK");
end;
if x<=y then
write (" OK");
else
write (" ERROR");
end;
write ("TESTING >=...");
if x>=x then
write (" OK");
else
write (" ERROR");
end;
if y>=x then
write (" OK");
else
write (" ERROR");
end;
if x>=y then
write (" ERROR");
else
write (" OK");
end;
end;