[Oberon] Compiler behaviour for a32 := a8

August Karlstrom fusionfile at gmail.com
Mon Feb 1 22:17:03 CET 2021

On 2021-02-01 14:39, Hans Klaver wrote:
> Chris wrote:
>> The key point is that Item 2 in the earlier definition has been removed and
>> the rule "The type of the expression must be the same as that of the
>> designator" now applies to array assignments. Hence a32 := a8 is no longer
>> allowed.
> Contrary to the latter rule that you cite a variable of one character
> array type now can be assigned to a variable of quite another
> character array type (provided the two array types have the same
> length). This is a breach in the type checking that amazes me.

As mentioned before in this mailing list, I asked Niklaus Wirth in 2017 
if structural equivalence of arrays and procedures is to be seen as a 
language extension and he answered:

"Yes, I consider this type compatibility as an addition to the language 
definition. I think it makes sense, and it is easy to implement. Please 
look at the source of the compiler under Project Oberon."

What I don't understand is why it hasn't been added to the language 
report if he thinks it both makes sense and is easy to implement.

-- August

More information about the Oberon mailing list