pdewacht/oberon-risc-emu

IMPORT T := Texts in image 2019

Closed this issue · 2 comments

At least in 2019 image there is the following compiler error:

This won't compile, because it treats T.Text and Oberon.Log (of type Texts.Texts) as different types:

IMPORT T := Texts, Oberon;
VAR W: T.Writer;
BEGIN
  T.OpenWriter(W);
  T.WriteString(W, "HELLO");
  T.Append(Oberon.Log, W.buf)

If T := Texts is changed to just Texts and T replaced with Texts, then the compilation becomes successful.

In an online RISC emulator, it is not the case (both variants work).

For info: This has been fixed in http://people.inf.ethz.ch/wirth/ProjectOberon/Sources/ORB.Mod.txt in March 2020 (ThisModule needs to compare orgname and not name). For more details, refer to the discussion on the oberon mailing list.

My online RISC emulator image has been updated since then, that's why it works there.

Obviously, the 2019 disk image uses the 2019 compiler :)

I've uploaded a new disk image.