问题标签 [oberon]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
1 回答
308 浏览

module - 我在哪里可以找到适用于 Ubuntu 16.04 的 Oberon 模块?

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

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

但得到错误:

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

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

0 投票
1 回答
292 浏览

types - 类 Pascal 语言中的类型等价

Oberon-2 语言报告“The Programming Language Oberon-2”在附录 A 中有以下定义:

两个类型为T aT b的变量ab属于同一类型,如果

  1. T aT b都由相同的类型标识符表示,或
  2. 在T a = T b形式的类型声明中,T a被声明为等于T b,或者
  3. ab出现在变量、记录字段或形式参数声明的同一标识符列表中,并且不是开放数组。

给定类型声明

上述定义中的第二段表明

  • TaTb是不同的类型(没有声明Ta = Tb),
  • TaTc是不同的类型(没有声明Ta = Tc)并且
  • Tc和 INTEGER 是不同的类型(没有声明Tc = INTEGER)。

这是对Oberon-2中相同类型的正确解释吗?据我了解,Oberon-2 在名称等效性方面非常严格,在这种情况下,这种解释实际上是有道理的。标准帕斯卡和 ISO Modula-2 怎么样?

0 投票
2 回答
141 浏览

language-design - 为什么模块和过程名称在主体之后重复?

在 Modula-2 和 Oberon 中,每个模块和过程声明必须以模块或过程的名称结尾。在 Pascal 中不需要它。我从来没有真正理解这样做的动机。有人可以启发我吗?

0 投票
1 回答
122 浏览

oberon - Can´t undertand 10th line instruction after inner FOR loop

I've been studying "Algorithms and Data Structures" by N.Wirth. He codes his algorithms in a language he created: Oberon. I finished the book but I have one doubt about this algorithim of page 19 coded in Oberon:

I don´t understand what the instructions in line 10 d[k] := 5; Texts.Write(W, "5"); Texts.WriteLn(W) does:

1) Why you would you d[k] := 5? the program already printed all the output required (d[0] to d[k-1]).

2) why would you print a 5 after that? (Texts.Write(W, "5"))

0 投票
1 回答
65 浏览

server - 无法在 BlackBox 中启动服务器

我正在尝试在 BlackBox 中启动服务器,到目前为止我只有这个

当我运行它时,我得到了错误 server:error starting the server(2)。我查了一下,错误 2 表示本地地址无效,但启动方法不需要任何参数,而且我不知道应该在哪里指定我的本地地址: 文档中的代码(理论:我需要自己启动一个新的侦听器吗?是默认端口忙?(更新:它是 900 并且它是打开的))

解决了!在 CommObxStreamsServer 文件中: localAdr="900"更改为localAdr="localhost:900"

0 投票
2 回答
71 浏览

oberon - 是否有适用于 Windows 的 Oberon-2 编译器支持 XYplane 模块?

我目前正在使用 Oxford Oberon-2 编译器,但它似乎不支持 XYplane 模块,这使得理解 Wirth 书中关于该语言的示例有点困难。