[Oberon] XML for Native/Plugin Oberon Update

Thomas Frey frey at inf.ethz.ch
Fri Feb 21 22:28:01 CET 2003

> Also what was the
> rational from moving from parameterless procedure
> commands to command procedures that take a
> pointer?
In a multiprocessing environment, global variables can not be used to pass
data since another process can modify it. The new generic command signature
eliminates the problem (generator procedures etc. can all be implemented
with the new signature)

The {DELEGATE} procedure variables have a similar rationale. Some
information about delegate procedure variables:
- DELEGATE procedure variables are like normal procedure variables plus a
context. The context is the SELF pointer of an object-instance (pointer to
the object instance). The delegate therefore saves {pointer to the object
instance, pointer to the procedure}
- Saving the additional context, allows calling a procedure of an object
- When a delegate procedure variable is called, the pointer to the object
instance is placed on the stack as the SELF pointer, the (optional)
parameters are pushed and then the procedure pointer is called.

Without delegates, procedures in an object (instance) could not be called.


More information about the Oberon mailing list