[Oberon] Portings Texts.Mod to Oberon-7, my Artemis project

Andreas Pirklbauer andreas_pirklbauer at yahoo.com
Sun Jun 20 08:26:20 CEST 2021


    > The Oberon-07 language report does not define the implementation of CHAR.
    > It can be 8 bits, 16 bits or even longer. The language does only define ORD, but
    > does not define what ORD returns. It might be ASCII, it might be EBCDIC or Unicode.

Could one therefore change the implementation of the data type CHAR such that
it can be Unicode, while simultaneously keeping the implementation backward
compatible, i.e ideally such that no c(!) ode in the system needs to be changed?

    > Principally, all program code using someting like ORD(ch)-48 is not portable.
    > Better is ORD(ch) - ORD(“0“). All program code assuming CHAR to be one byte
    > is not portable. Use BYTE instead.

Of course, in places where non-portable code exists in the system, one would
then need to adapt it.


More information about the Oberon mailing list