[Oberon] Clarifying type compatibility in Oberon-07
joerg.straube at iaeth.ch
Wed Oct 11 07:55:20 CEST 2017
> TYPE Births = INTEGER;
> Accidents = INTEGER;
> nbrOfBirthsPerMonth: Births;
> nbrOfAccidentsPerMonth: Accidents;
> nbrOfBirthsPerMonth := nbrOfAccidentsPerMonth; (*allowed*)
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 :-)
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Oberon