[Oberon] Clarifying type compatibility in Oberon-07

Andreas Pirklbauer andreas_pirklbauer at yahoo.com
Thu Oct 5 16:38:12 CEST 2017


EDIT:

Assignment compatible
…
*8. Tv is ARRAY n OF Ta, e is ARRAY OF Tb, where Ta and Tb are the same type


> On 05 Oct 2017, at 16:31, Andreas Pirklbauer <andreas_pirklbauer at yahoo.com> wrote:
> 
> > On Thu Oct 5 12:52:20 CEST 2017 Jörg joerg.straube at iaeth.ch <mailto:joerg.straube at iaeth.ch> wrote:
> > Assignment rule 1 uses „same type". The things NOT covered by „same type“ are mentioned explicitly with own assignment rules.
> >
> > 4. Ta and Tb are pointer types whose pointer base types are the same, or
> > This rule is not needed, as it is covered by Assignment rule 4, assuming T is an extension of T itself.
> > 5. Ta and Tb are procedure types whose formal parameter lists match.
> > This rule is not needed as it covered by Assignment rule 7.
> > 
> > br
> > Jörg
> Ok. So these two proposed rules are not needed (assuming T is an extension of T itself).
> 
> While we are at it, what about the following similar rules for arrays (changes are marked with an asterisk * below). Would these be covered by the existing type rules and/or can these be derived from the language report? If these rules cannot be derived from the language report, should the language itself be extended?
> 
> Same Types
> Two variables a and b with types Ta and Tb are of the same type if
> ...
> *4. Ta and Tb are array types with same element types and lengths
> 
> Assignment compatible
> 
> An expression e of type Te is assignment compatible with a variable v of
> type Tv if one of the following conditions hold:
> ...
> *8. Tv is ARRAY OF Ta, e is ARRAY OF Tn, where Ta and Tb are the same types
> 
> -AP

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.inf.ethz.ch/pipermail/oberon/attachments/20171005/95cb50de/attachment.html>


More information about the Oberon mailing list