<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">EDIT:<div class=""><br class=""></div><div class="">Assignment compatible</div><div class="">…</div><div class="">*8. Tv is ARRAY n OF Ta, e is ARRAY OF Tb, where Ta and Tb are the same type</div><div class=""><br class=""><div class=""><br class=""><div><blockquote type="cite" class=""><div class="">On 05 Oct 2017, at 16:31, Andreas Pirklbauer <<a href="mailto:andreas_pirklbauer@yahoo.com" class="">andreas_pirklbauer@yahoo.com</a>> wrote:</div><div class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><pre class="" style="background-color: rgb(255, 255, 255);"><span class=""><span style="white-space: pre-wrap;" class="">
> On Thu Oct 5 12:52:20 CEST 2017 Jörg <a href="mailto:joerg.straube@iaeth.ch" class="">joerg.straube@iaeth.ch</a> wrote:</span></span><br class=""></pre><pre class="" style="background-color: rgb(255, 255, 255);"><span class="" style="white-space: pre-wrap;">> 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</span></pre><pre class="" style="background-color: rgb(255, 255, 255);"><span class="" style="white-space: pre-wrap;">Ok. So these two proposed rules are not needed (assuming T is an extension of T itself).</span></pre><pre class="" style="background-color: rgb(255, 255, 255);"><span style="white-space: pre-wrap;" class=""><br class=""></span></pre><pre class="" style="background-color: rgb(255, 255, 255);"><span style="white-space: pre-wrap;" class="">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? </span><span style="white-space: pre-wrap;" class="">If these rules cannot be derived from the language report, should the language itself be extended?</span></pre><pre class="" style="background-color: rgb(255, 255, 255);"><span class="" style="white-space: pre-wrap;"><br class=""></span></pre><pre class="" style="background-color: rgb(255, 255, 255);"><span class="" style="white-space: pre-wrap;">Same Types</span></pre><pre class="" style="background-color: rgb(255, 255, 255);"><span class="" style="white-space: pre-wrap;">Two variables a and b with types Ta and Tb are of the same type if</span></pre><pre class="" style="background-color: rgb(255, 255, 255);"><span class="" style="white-space: pre-wrap;">...</span></pre><pre class="" style="background-color: rgb(255, 255, 255);"><span class="" style="white-space: pre-wrap;">*4. Ta and Tb are array types with same element types and lengths</span></pre><pre class="" style="background-color: rgb(255, 255, 255);"><br class=""></pre><pre class="" style="background-color: rgb(255, 255, 255);"><span class="" style="white-space: pre-wrap;">Assignment compatible</span></pre><pre class="" style="background-color: rgb(255, 255, 255);"><span class="" style="white-space: pre-wrap;"><br class=""></span></pre><pre class="" style="background-color: rgb(255, 255, 255);"><span class="" style="white-space: pre-wrap;">An expression e of type Te is assignment compatible with a variable v of
type Tv if one of the following conditions hold:</span></pre><pre class="" style="background-color: rgb(255, 255, 255);"><span class="" style="white-space: pre-wrap;">...</span></pre><pre class="" style="background-color: rgb(255, 255, 255);"><span class="" style="white-space: pre-wrap;">*8. Tv is ARRAY OF Ta, e is ARRAY OF Tn, where Ta and Tb are the same types</span></pre><pre class="" style="background-color: rgb(255, 255, 255);"><br class=""></pre><pre class="" style="background-color: rgb(255, 255, 255);"><span class="" style="white-space: pre-wrap;">-AP</span></pre></div></div></blockquote></div><br class=""></div></div></body></html>