[Oberon] IMPORT Modules: why does order matter?

Andreas Pirklbauer andreas_pirklbauer at yahoo.com
Sun Mar 3 14:33:01 CET 2019


    > Andreas
    >
    > Automatic replacement of EXIT is something along these rules:
    >
    > * LOOP statSeq END                            —> done := FALSE; REPEAT statSeq UNTIL done;
    > * IF cond THEN statSeq; EXIT END;   —> IF cond THEN statSeq; done := TRUE
    > statSeq2                                                      ELSE statSeq2
    >                                                                END
    >
    > br
    > Jörg

Yes, of course, but the resulting code can in many cases be expressed in better/cleaner ways. See
the Oberon compiler itself for example. In all (4) cases of the LOOP statement, the new solution with
REPEAT or WHILE - after having been ported to Oberon-07 - turned out to be more satisfactory.

But sure.. if all you want is an *equivalent* program (as opposed to an *elegant* one), the above
automatic replacement can be done. I just wouldn’t want to maintain such a translated program ;-)



More information about the Oberon mailing list