[Oberon] Doubt from Project Oberon book.

Bob Walkden bob at web-options.com
Sun Dec 23 19:10:26 CET 2012


> From: Srinivas Nayak [mailto:sinu.nayak2001 at gmail.com]
> 
> Dear Bob,
> 
> Many thanks for making my doubt clear.
> Now I am able to see the whole idea.
> 
>     so the contents of
>     their variables are still available and other modules can use them
> 
> 
> However, if somebody unloads the previous module before second command
> starts?
> Or this case is not possible?
> 

It is possible. But the Oberon system will only unload a module M1 if there
are no active references to it. This means that if the module M2 which
contains the second command has already been loaded, then you cannot unload
M1. 

If on the other hand M2 has not been loaded, then you can unload M1.

Loading M2 would then re-load M1, because of the import dependency. But of
course the storage would be refreshed so the earlier results would no longer
be available unless you had taken steps within M1 to save & retrieve them.

B




More information about the Oberon mailing list