[Oberon] IMPORT Modules: why does order matter?

Chris Burrows chris at cfbsoftware.com
Sun Mar 3 11:38:09 CET 2019


> -----Original Message-----
> From: Oberon [mailto:oberon-bounces at lists.inf.ethz.ch] On Behalf Of
> Till Oliver Knoll
> Sent: Sunday, 3 March 2019 7:31 PM
> To: oberon at lists.inf.ethz.ch
> Subject: Re: [Oberon] IMPORT Modules: why does order matter?
> 
> But still: the times that I keep adding a "superfluous" ; at the end
> of the "last statement" (and where the compiler is furiously bitching
> at me with a short "no end" compiler error) also far exceed the
> number that I'd wish for ;)
> 

Using semicolon as a null *statement* after the last statement in a
statement sequence *is* allowed. Pascal programmers might also be surprised
to know that they can now include a semicolon as a null statement before an
ELSE. What I suspect you might be trying to do is insert a semicolon before
the END following a RETURN?

Oberon's RETURN *statement* that could be inserted anywhere in a statement
sequence was (thankfully) eliminated in Oberon-07. The RETURN clause is now
bound to the end of a procedure and is followed by an *expression*. Once you
understand the difference, you should be no more tempted to write

  RETURN a = b; 

than you would be tempted to write

  IF a = b;

Regards,
Chris

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







More information about the Oberon mailing list