No need for these ob2 files anymore

This commit is contained in:
Antranig Vartanian 2024-05-11 21:39:32 +04:00
parent fed6fad453
commit e60f8acb9f
No known key found for this signature in database
GPG key ID: DE3998662D59F21C
21 changed files with 0 additions and 601 deletions

View file

@ -1,20 +0,0 @@
MODULE square;
IMPORT Out;
VAR s : INTEGER;
PROCEDURE squared(x : INTEGER): INTEGER;
BEGIN
RETURN x * x
END squared;
BEGIN
s := squared(7);
Out.Int(s, 0); Out.Ln;
Out.Int(squared(8), 0); Out.Ln;
END square.

View file

@ -1,15 +0,0 @@
MODULE proc;
IMPORT Out;
PROCEDURE printSum(a, b : INTEGER);
BEGIN
Out.Int(a + b, 0); Out.Ln
END printSum;
BEGIN
printSum(6, 9)
END proc.

View file

@ -1,24 +0,0 @@
MODULE varparam;
IMPORT Out;
VAR a, b : INTEGER;
PROCEDURE swapVals(VAR x, y : INTEGER);
VAR tmp : INTEGER;
BEGIN
tmp := x; x := y; y := tmp;
END swapVals;
BEGIN
a := 6; b := 9;
Out.String("initial "); Out.Ln;
Out.String("a : "); Out.Int(a, 0); Out.String("; b : "); Out.Int(b, 0); Out.Ln;
swapVals(a, b);
Out.String("after swap"); Out.Ln;
Out.String("a : "); Out.Int(a, 0); Out.String("; b : "); Out.Int(b, 0); Out.Ln;
END varparam.