[Oberon] CASE without ELSE
thomas.kral at email.cz
Sat Feb 17 18:27:15 CET 2018
On Fri, 16 Feb 2018 10:42:41 +0100
Josef Templ <josef.templ at gmail.com> wrote:
> The latest Oberon language definition by NW that I have found is
> Revision 1.10.2013 / 3.5.2016
> (see http://people.inf.ethz.ch/wirth/Oberon/Oberon07.Report.pdf).
> It does have a numeric CASE statement.
Trying to catch up with this rather interesting post. Let me quote the
code part of the `ORP' (4.4.2017) parser.
ELSIF sym = ORS.case THEN
IF sym = ORS.ident THEN
qualident(obj); orgtype := obj.type;
IF (orgtype.form = ORB.Pointer) OR (orgtype.form =
ORB.Record) & (obj.class = ORB.Par) THEN Check(ORS.of, "OF expected");
TypeCase(obj, x); L0 := 0; WHILE sym = ORS.bar DO
ORS.Get(sym); ORG.FJump(L0); ORG.Fixup(x); obj.type :=
orgtype; TypeCase(obj, x) END ;
ORG.Fixup(x); ORG.FixLink(L0); obj.type := orgtype
ELSE ORS.Mark("numeric case not implemented");
Numeric CASE seems really not implemented while `Oberon.Report-07'
claims it is part of the language. I wish to know, if it was left out
on purpose, possibly expected to be included in future revisions?
Tomas Kral <thomas.kral at email.cz>
More information about the Oberon