[Oberon] CASE without ELSE

Diego Sardina dsar at eml.cc
Thu Feb 15 22:42:31 CET 2018


On Thu, Feb 15, 2018, at 10:26 PM, Jörg Straube wrote:
> Based on Chris‘ example you could write
> 
> CASE String.Pos(ch, "ILTQX", 0) OF
> -1: (* else case *)
> | 0: (* inspect *)
> | 1: (* load *)
> | 2: (* transfer *)
> | 3: (* quit *)
> | 4:
> END
> 

Chris didn't write that form because case labels in Oberon-07 are not ConstExpression anymore (a negative number is considered a form of expression). Only integers, single character strings or qualidents (for the typecase form).

This is a sort of simplification because there is no more a need for an offset







More information about the Oberon mailing list