[Oberon] CASE without ELSE

Diego Sardina dsar at eml.cc
Fri Feb 16 11:10:05 CET 2018


On Fri, Feb 16, 2018, at 10:42 AM, Josef Templ wrote:
> 
> In contrast to some postings, by the way, the labels are not forced to start with 0
> and they can also be negative (by specifying a negative named constant).
> In a real implementation, it would be much simpler to allow any ConstantExpr
> of appropriate result type, though.
> 

Before the type-case form, labels were only integer | string in the grammar, or even only integer long before (in 2008 report). The absence of qualident precluded the use of named constants.

Later qualident was added but only for the type discrimination, I think.

The fact that labels start from 0 is explicitly written here: http://people.inf.ethz.ch/wirth/Oberon/Oberon07.pdf

I don't think the removal of ELSE was unintentional, also original Pascal didn't have it.




More information about the Oberon mailing list