[Oberon] A CASE quiz
chris at cfbsoftware.com
Fri Feb 16 13:29:59 CET 2018
> -----Original Message-----
> From: Jörg [mailto:joerg.straube at iaeth.ch]
> Sent: Friday, 16 February 2018 10:37 PM
> To: chris at cfbsoftware.com; 'ETH Oberon and related systems'
> Subject: RE: [Oberon] A CASE quiz
> Okay. Q and T are not mentioned and will be trapped.
Good effort but only 5/10 I'm afraid ;-) You were right about "Q" but "T" IS
there. You have inadvertently helped to illustrate that even skilled
programmers make these sorts of mistakes.
> If you know that for Q and T the value should be 0 then why not
> mention them explicitly.
That's the whole point of the quiz. "Q" should be 2 but the programmer
forgot it altogether.
The ELSE swallows it up without it being noticed (!!!), but the NoElse
results in a runtime error
so alerts the programmer that something needs fixing.
The earlier in the software lifecycle that an error is detected, the cheaper
it is to fix it.
> We really have to see, how many of us did detect that the numeric
> CASE is not implemented (yet) in ORP.Mod?
It has been previously discussed here a couple of years ago:
More information about the Oberon