[Oberon] Alternatives for cases.

Chris Burrows chris at cfbsoftware.com
Sat Mar 9 08:17:52 CET 2019


> -----Original Message-----
> From: Oberon [mailto:oberon-bounces at lists.inf.ethz.ch] On Behalf Of
> Andreas Pirklbauer
> Sent: Saturday, 9 March 2019 4:01 PM
> To: ETH Oberon and related systems
> Subject: [Oberon] Alternatives for cases.
> 
> But I have a sneaking suspicion that there may have been other (than
> performance-related) reasons for not implementing the numeric CASE
> statement in the official FPGA Oberon release.
> 

Why might that be? The only reason I can think of is taking 'as simple as possible' further than previously. It has been argued that CASE and IF-THEN-ELSE are equivalent but I disagree.

For me it is not just efficiency that leads me to choose the CASE statement when I do. If I was able to succinctly write

IF ch IN {"A", "E", "I", "O", "U"} THEN ...

isLetter := ch IN {"A".."Z", "a".."z"};

etc. etc.

like I was able to in Modula-2 then I might have less need for these features of CASE. 

Having said that, I'm not asking for SET OF CHAR and all that comes with it. The 'Numeric' CASE as defined in the Oberon report is sufficient for my purposes.

Regards,
Chris

Chris Burrows
CFB Software
http://www.astrobe.com


 

  



More information about the Oberon mailing list