[Oberon] PO 2013 allows one to "override" predefined procedures and functions

Jörg joerg.straube at iaeth.ch
Fri May 14 16:25:11 CEST 2021



Gruss, Jörg

> Am 14.05.2021 um 16:23 schrieb Diego Sardina <dsar at eml.cc>:
> 
> On Fri, May 14, 2021, at 3:29 PM, Andreas Pirklbauer wrote:
>> Has anyone noticed that the PO 2013 allows the programmer
>> to “overrride” predefined procedures and functions, e.g.,
>> 
>>  MODULE M;
>>    VAR
>>       INC: CHAR;
>>       i: INTEGER;
>>  BEGIN
>>    INC := "a”;
>>    INC(i)           (*not a procedure*)
>>  END M.
>> 
>> This should not be allowed..
>> 
> 
> For what I remember in Oberon every predefined identifier can be overridden since always.
> 
> This is the reason TRUE and FALSE were promoted to keyword in Oberon-07, to avoid CONST TRUE = FALSE.
> 
> But I agree that this shouldn't be allowed (and that promotion to keyword is debatable).
> 
> --
> Diego Sardina
> --
> Oberon at lists.inf.ethz.ch mailing list for ETH Oberon and related systems
> https://lists.inf.ethz.ch/mailman/listinfo/oberon


More information about the Oberon mailing list