[Oberon] Oberon for a C++ user.

Alexander Ilin ajsoft at yandex.ru
Mon Nov 14 09:45:41 CET 2016


> With a final record that extends no record
> I'm not creating or using a framework. I've
> a fully concrete record that neither requires
> dynamic dispatch for type-bound procedures.
>
> The NEW keyword is totally meaningless here,
> it makes sense in TBPs of EXTENSIBLE records
> and for those final ones that extends a record.

Here's the code you are describing, and it has no extra keywords:

MODULE MyTest;

TYPE
	MyRecord = RECORD
		data1, data2: INTEGER
	END;

	PROCEDURE Do* (VAR rec: MyRecord);
	BEGIN
		rec.data1 := 0;
		rec.data2 := 1
	END Do;

END MyTest.

---=====--- 
 Александр


More information about the Oberon mailing list