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
/
binary2.pcat
< prev
next >
Wrap
Text File
|
2006-03-05
|
516b
|
28 lines
(* This program tests iadd, isub, imul, fadd, fsub, fmul, fdiv. *)
program is
var x: integer := 0;
y: integer := 3;
z: integer := 4;
a: real := 0.0;
b: real := 3.3;
c: real := 4.4;
begin
x := y + z;
write ("3 + 4 = ", x);
x := y - z;
write ("3 - 4 = ", x);
x := y * z;
write ("3 * 4 = ", x);
a := b + c;
write ("3.3 + 4.4 = ", a);
a := b - c;
write ("3.3 - 4.4 = ", a);
a := b * c;
write ("3.3 * 4.4 = ", a);
a := b / c;
write ("3.3 / 4.4 = ", a);
end;