[Oberon] Realloc function and simulating continue and break in Oberon-07 loops

Chris Burrows cfbsoftware at gmail.com
Thu Oct 20 22:28:12 CEST 2022


On Fri, Oct 21, 2022 at 5:45 AM Deadmarshal <adeadmarshal at gmail.com> wrote:

> Hi,
>
> I was wondering how one can break and continue loops in Oberon-07?
> In Oberon-2 there is a LOOP keyword which has EXIT to break the loop, but
> it is removed from Oberon-07, and the EXIT keyword can't be used in FOR or
> WHILE loops.
>
>
Oberon-2:

LOOP
  Sequence 1 of statements...
  IF exit THEN EXIT END;
  Sequence 2 of statements...
END

Oberon-07

REPEAT
  Sequence 1 of statements...
  IF ~exit THEN
    Sequence 2 of statements...
  END
UNTIL exit

Regards,
Chris Burrows
CFB Software
https://www.astrobe.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.inf.ethz.ch/pipermail/oberon/attachments/20221021/bd4a3550/attachment.html>


More information about the Oberon mailing list