[Oberon] IF DO (was: Where's Coco's 'hello world' ?)

Chris Burrows chris at cfbsoftware.com
Fri Aug 1 01:56:52 MEST 2008

Interesting ....

Wirth has actually made a move in a similar direction very recently. In
Oberon-07 he has introduced an extension to the WHILE statement which has a
DO following an ELSIF.

  WHILE expression DO statementSequence
    {ELSIF expression DO statementSequence} END

Chris Burrows
CFB Software

>-----Original Message-----
>From: oberon-bounces at lists.inf.ethz.ch 
>[mailto:oberon-bounces at lists.inf.ethz.ch] On Behalf Of Jorg Straube
>Sent: Friday, 1 August 2008 2:19 AM
>To: 'ETH Oberon and related systems'
>Subject: RE: [Oberon] Where's Coco's 'hello world' ?
>Normally, Wirth lives according to "Make it as simple as 
>possible but not simpler".
>Look at this syntax:
>a) IF Cond THEN Statments END;
>b) WHILE Cond DO Statments END;
>Sometimes during debugging algorithms I find myself in the 
>position to start with an IF and change it later to a WHILE! 
>(Don't know, if I'm the only one with such an approach...)
>So, I have to change the "IF" into a "WHILE"
>I always was wondering why he did not propose this syntax:
>a) IF Cond DO Statements END;
>Just my thoughts :-)
>Oberon at lists.inf.ethz.ch mailing list for ETH Oberon and 
>related systems https://lists.inf.ethz.ch/mailman/listinfo/oberon

More information about the Oberon mailing list