[Oberon] CASE statement
Duke Normandin
dukeofpurl at gmx.com
Fri Apr 9 05:12:19 CEST 2021
On Fri, 9 Apr 2021 10:45:05 +0930
"Chris Burrows" <chris at cfbsoftware.com> wrote:
> > Is it possible to have execute a block of code - BEGIN .... END for
> > one or more CASE alternatives? I'm trying to simulate the following
> > C code:
[snip]
> Yes you can have blocks of code (multiple statements) in each CASE
> alternative in an Oberon-2 program. For example the CASE example in
> the Oberon-2 Report is:
Yes! I've read the Report and ALL the other docs, but NONE of them speak of the option to have multiple statements in a CASE alternative. None that I could stumble across anyway.
[snip]
> However you don't need both BEGIN and END if the case has more than
> one statement. The BEGIN is redundant. The end of each block is
> indicated by "|", "ELSE" or "END" e.g.
That's why I'm grateful for the example your cobbled together for me! Much obliged. Thx!!
--
Duke Normandin <dukeofpurl at gmx.com>
More information about the Oberon
mailing list