[Oberon] Clarifying type compatibility in Oberon-07

Jörg joerg.straube at iaeth.ch
Wed Oct 11 07:55:20 CEST 2017


>   TYPE Births = INTEGER;
>     Accidents = INTEGER;
> 
>   VAR
>     nbrOfBirthsPerMonth: Births;
>     nbrOfAccidentsPerMonth: Accidents;
> 
>     nbrOfBirthsPerMonth := nbrOfAccidentsPerMonth; (*allowed*)
> 
Touché.

You’re absolutely right. Implicitely, I had only structured types in mind!
The purist me would not allow above either, but the pragmatic me says: make an exception for basic types.

But as you can see in above sentence: I‘m schizophrenic and talk to myself :-)

br
Jörg

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.inf.ethz.ch/pipermail/oberon/attachments/20171011/7ffc9172/attachment.html>


More information about the Oberon mailing list