[Oberon] SYSTEM Modules

Jörg Straube joerg.straube at iaeth.ch
Mon Nov 12 06:40:48 CET 2018

You‘re right. It’s not the safety I‘m referring to but rather the portability.

  n := ORD(ch) - ORD(“A“);
  Out.Ch(ch); Out.String(“ is the “);
  Out.Int(n, 0); Out.String(„th character.);

Will work with ASCII but not with EBCDIC.


> Am 11.11.2018 um 23:02 schrieb Richard Hable <informujo at aon.at>:
>> On 11.11.18 22:35, Jörg Straube wrote:
>> Yes, safe/unsafe is the definition with the very prominent exception of ORD.
> I don't see any unsafety with the ORD function: different systems use
> different characters sets, thus the resulting character code values can
> vary.
> Similarily, different systems use different line endings, thus the
> procedure Out.Ln may output an LF character on Unix-like systems and the
> CR/LF sequence on Windows systems.
> The programmer simply has to be aware of such differences.
> Richard
> --
> 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