[Oberon] When is it safe to unload a module?
Andreas Pirklbauer
andreas_pirklbauer at yahoo.com
Mon Aug 6 05:29:46 CEST 2018
ADDENDUM: And adjust M1.Mod to the code below
(procedure P slightly adjusted to call gproc)
MODULE M1;
IMPORT M0;
TYPE Ptr* = POINTER TO Rec;
Rec* = RECORD (M0.Rec) END ; (*extension of M0.Rec*)
VAR gptr*: Ptr;
gproc*: M0.Proc;
PROCEDURE P*; BEGIN gproc END P;
PROCEDURE SetGPtr*(q: M0.Ptr); BEGIN gptr := q(Ptr) END SetGPtr;
PROCEDURE SetLPtr*(q: M0.Ptr); BEGIN gptr.lptr := q(Ptr) END SetLPtr;
PROCEDURE SetGProc*(q: M0.Proc); BEGIN gproc := q END SetGProc;
PROCEDURE SetLProc*(q: M0.Proc); BEGIN gptr.lproc := q END SetLProc;
PROCEDURE Init*; BEGIN NEW(gptr) END Init;
BEGIN Init
END M1.
------------------------------------------------------------------------
More information about the Oberon
mailing list