mirror of
https://github.com/vishapoberon/oberonbyexample.git
synced 2026-04-05 21:02:25 +00:00
changed tabs with spaces
This commit is contained in:
parent
e49b38df73
commit
d110fb0ac8
12 changed files with 132 additions and 119 deletions
|
|
@ -28,6 +28,13 @@ BEGIN
|
|||
Out.Int(n,0); Out.String(" is even"); Out.Ln;
|
||||
END;
|
||||
|
||||
IF ~ODD(m)
|
||||
THEN
|
||||
Out.Int(m,0); Out.String(" is even"); Out.Ln;
|
||||
ELSE
|
||||
Out.Int(m,0); Out.String(" is odd"); Out.Ln;
|
||||
END;
|
||||
|
||||
n := 9;
|
||||
|
||||
IF n < 0
|
||||
|
|
|
|||
|
|
@ -3,13 +3,16 @@ 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;
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@ MODULE proc;
|
|||
|
||||
IMPORT Out;
|
||||
|
||||
|
||||
PROCEDURE printSum(a, b : INTEGER);
|
||||
BEGIN
|
||||
Out.Int(a + b, 0); Out.Ln
|
||||
|
|
|
|||
|
|
@ -1,9 +1,11 @@
|
|||
MODULE varparam;
|
||||
|
||||
|
||||
IMPORT Out;
|
||||
|
||||
VAR
|
||||
a, b : INTEGER;
|
||||
|
||||
VAR a, b : INTEGER;
|
||||
|
||||
|
||||
PROCEDURE swapVals(VAR x, y : INTEGER);
|
||||
VAR tmp : INTEGER;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue