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
/
goto2.pcat
< prev
next >
Wrap
Text File
|
2006-03-05
|
2KB
|
104 lines
(* This routine tests integer conditional gotos. *)
program is
var i: integer := 1;
j: integer := 2;
begin
write ("SHOULD PRINT ALL OKS AFTER EACH TEST:");
write ("TESTING =...");
if i=j then
write (" ERROR");
else
write (" OK");
end;
if i=i then
write (" OK");
else
write (" ERROR");
end;
write ("TESTING <>...");
if i<>j then
write (" OK");
else
write (" ERROR");
end;
if i<>i then
write (" ERROR");
else
write (" OK");
end;
write ("TESTING <...");
if i<i then
write (" ERROR");
else
write (" OK");
end;
if j<i then
write (" ERROR");
else
write (" OK");
end;
if i<j then
write (" OK");
else
write (" ERROR");
end;
write ("TESTING >...");
if i>i then
write (" ERROR");
else
write (" OK");
end;
if j>i then
write (" OK");
else
write (" ERROR");
end;
if i>j then
write (" ERROR");
else
write (" OK");
end;
write ("TESTING <=...");
if i<=i then
write (" OK");
else
write (" ERROR");
end;
if j<=i then
write (" ERROR");
else
write (" OK");
end;
if i<=j then
write (" OK");
else
write (" ERROR");
end;
write ("TESTING >=...");
if i>=i then
write (" OK");
else
write (" ERROR");
end;
if j>=i then
write (" OK");
else
write (" ERROR");
end;
if i>=j then
write (" ERROR");
else
write (" OK");
end;
end;