Notes on Into the Realm of Oberon

This document tracks my experience of running examples and exercises in Eric Nikitin's introductory text to Oberon programming: Into the Realm of Oberon. The book was run on Oberon/F, when it's language was Oberon/L (essentially Oberon-2). I did an initial run through using Blackbox Component Builder (the Oberon/F successor), version 1.6, which sufficiently revises Oberon/L, to have a new language name: Component Pascal.

OfeHello

The Ofe referred to in the book is a convention to avoid naming collisions in the single directory design of the Oberon system, similar to Medos. See the Module Registry. This is treated as a subsystem name in Blackbox. The convention is likely not needed with Oberon compilers native to operating systems that support file systems with multiple directories. It's not clear what Ofe refers to. Perhaps it's an acronym for Oberon/F Eric.

Reserved identifiers

The FOR statement, which includes BY, is an extension of Oberon-2 that is not part of the original language. It was added back to Oberon by Wirth in is his 1996 book Compiler Construction, and has remained since.

A Curious Comment about Comments

The Modula-2 reports explicitly state that comments were nested. However, none of the Oberon(-1) reports do so. Even the earlier Oberon-2 reports do not explictly identify this (the 1993 Oberon-2 report reads the same as Wirth's, whereas the 1995 Oberon-2 report reads the same as the Modula-2 reports). There is no EBNF that defines comments. Therefore, a careful reading seems to suggest that though nesting comments is certainly a valid, and the more common, interpretation of Oberon and earlier Oberon-2 reports, it could be suggested that not exlicitly allowing nesting comments in the Oberon report suggests that not implementing nesting would also be valid. However, the OCS.Get function's comment procedure in Project Oberon (1992) recursively checks for comments, as does Oberon-0's (1996).

Differences in examples

Using Blackbox Component Builder 1.6 on Windows led identifying a couple of build issues. In OfeParmtest,, ChangeVal uses parameter valNumber, then tries to output number instead of valNumber. number should be changed to valNumber in this instance.

In OfeRecord, Execute outputs carB.price with a size of 9. The program will compile and run, but a size of 8 will make the output line up.

Blackbox Component Builder

Type extension declarations, type bound procedures, and removal of the COPY built-in procedure require adapting programs from Oberon-2 to Component Pascal.

Chapter 3.3, LONGINT is 32-bit, but in Blackbox it is 64-bit. In OfeVal, use INTEGER not LONGINT for SET compatibility.

©2015, 2019 David Egan Evans.