Post by August KarlstromThis is very informative. If I understand this correctly my
interpretation is correct under strict name equivalence. As far as I
understand the definition of *same type* in Oberon-2, it doesn't say if
the name equivalence is strict or loose. What is the typical case
against strict name equivalence?
No, loose name equivalence.
That case is covered by 2) in:
1) Ta and Tb are both denoted by the same type identifier, or
2) Ta is declared to equal Tb in a type declaration of the form Ta = Tb, or [...]
Note that Ta and Tb are two different type identifiers (identifiers introduced with TYPE), because 1) is false.
Same types concern only types introduced with a type declaration.
For example:
TYPE
Ta = ARRAY 10 OF INTEGER
Tb = ARRAY 10 OF INTEGER
Are Ta and Tb denoted by the same type identifier?
False, they are two different type identifiers.
Is Ta declared equal to Tb in a type declaration of the form Ta = Tb?
False, they are not.
They are not the same type.
Another example:
TYPE
Ta = INTEGER
Tb = INTEGER
Tc = Tb
Note that Basic types are defined as "predeclared" (type) identifiers.
Are Ta/Tb and INTEGER denoted by the same type identifier?
False, they are two different type identifiers.
Is Ta/Tb declared equal to INTEGER in a type declaration of the form Ta = Tb?
True, they are.
So Ta and Tb are the same type.
The same follows for Tc and Tb.
Of course for transitivity Ta, Tb and Tc are all the same type.
--
Diego Sardina