1

我读了 Niklaus Wirth 的书,想试试这本书中的例子。

我尝试运行简单的 Oberon hello world:http ://groups.engin.umd.umich.edu/CIS/course.des/cis400/oberon/hworld.html#source

但得到错误:

$ obc -o hello Hello.m
"Hello.m", line 4: the interface file for 'Oberon' cannot be found
>          IMPORT Oberon, Texts;
>                 ^^^^^^

"Hello.m", line 4: the interface file for 'Texts' cannot be found
>          IMPORT Oberon, Texts;
>                         ^^^^^

显然我应该安装所需的模块。快速谷歌搜索不给我答案。那么我在哪里可以找到这个模块?

我从这个 deb http://spivey.oriel.ox.ac.uk/corner/Installing_OBC_release_3.0安装 Oberon

4

1 回答 1

3

OberonTexts模块通常与 Oberon 操作系统相关联。我所知道的独立 Oberon 编译器的唯一库标准是“Oberon-2 编译器开发人员的 Oakwood 指南”。使用模块OutHello World程序应该很简单

MODULE hello;

    IMPORT Out;

BEGIN
    Out.String("hello, world");
    Out.Ln
END hello.

我还可以推荐编译器 OBNC,它实现了(原始)Oberon 语言的最新版本:

https://miasap.se/obnc/

于 2017-09-03T20:33:27.477 回答