Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
20
Task/Compound-data-type/Oberon/compound-data-type.oberon
Normal file
20
Task/Compound-data-type/Oberon/compound-data-type.oberon
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
MODULE Point;
|
||||
TYPE
|
||||
Object* = POINTER TO ObjectDesc;
|
||||
ObjectDesc* = RECORD
|
||||
x-,y-: INTEGER;
|
||||
END;
|
||||
|
||||
PROCEDURE (p: Object) Init(x,y: INTEGER);
|
||||
BEGIN
|
||||
p.x := x; p.y := y
|
||||
END Init;
|
||||
|
||||
PROCEDURE New*(x,y: INTEGER): Object;
|
||||
VAR
|
||||
p: Object;
|
||||
BEGIN
|
||||
NEW(p);p.Init(x,y);RETURN p;
|
||||
END New;
|
||||
|
||||
END Point.
|
||||
Loading…
Add table
Add a link
Reference in a new issue