[Oberon] Clarifying type compatibility in Oberon-07

Richard Hable informujo at aon.at
Sun Oct 8 14:47:30 CEST 2017


On 2017-10-08 14:24, Jörg wrote:

> If you use the type „Texts.Frame" you have to know that you can use „hasCar", „lsp" or „selbeg“. You don’t repeat all RECORD fields.

Record fields are only used in combination with their record variable.
Thus, “myFrame.selbeg” clearly indicates that “selbeg” refers to a field
of “myFrame”.

> If you use the type „RealFunction“, you have to know that „v“ is part of it. Why shall it be different?

In the expression “RealFunction(RETURN Math.sin(v))” the variable “v”
could be anything: a variable defined within the calling function, some
global variable with this name, or actually the name of a formal
parameter of “RealFunction”. You have to examine the exact definition of
“RealFunction” including its formal parameter names, to find out.

Richard


More information about the Oberon mailing list