[Oberon] PO2013 - Modules.Load - recursion

Tomas Kral thomas.kral at email.cz
Sat May 30 19:39:58 CEST 2020


Hi,

Following up from `PO2013 - SD Image Tool'.

Module Oberon imports MenuViewers, TextFrames,
both depend back on Oberon, which is not loaded, but to be
loaded.

Oberon -> MenuViewers -> Oberon ....
Modules.Load recursion terminates.

But how about this example, it even needs a trick to get modules M0,M1
compiled.

But recursion during load does not terminate?

MODULE M0;
  IMPORT M1, Out;
  PROCEDURE Load*; END Load;
  PROCEDURE Echo*;
  BEGIN Out.String("M0 echo"); Out.Ln
  END Echo;
BEGIN M1.Echo
END M0.

MODULE M1;
  IMPORT M0, Out;
  PROCEDURE Echo*;
  BEGIN Out.String("M1 echo"); Out.Ln
  END Echo;
BEGIN M0.Echo
END M1.

M0.Load

-- 
Tomas Kral <thomas.kral at email.cz>


More information about the Oberon mailing list