[Oberon] Oberon Wiki ; what happend with WITH

Frans-Pieter Vonck fp at vonck.nl
Sun Jan 9 22:26:26 CET 2011


Is there anyone of the oberonlist maintaining the wiki page of Oberon-2?
http://en.wikipedia.org/wiki/Oberon-2_%28programming_language%29

I found the following flaw in the "Type binding" section

MODULE Birds;
    TYPE
        Bird* = RECORD
            sound* : ARRAY 10 OF CHAR;
        END;
END Birds.

The semicolon after CHAR is superfluous.
Actually the Oberon07 compiler of Astrobe rendered the following error.
 5   36:  ident missing


I also found that in the Oberon07 reports that the WITH statement is
omitted, however there is no explanation why this was done. From the
examples of the Wiki pages I could not conclude myself why leaving WITH
out of the language was a good thing.

[..] WITH statement, which allows the dynamic subtype of a variable to be
checked directly.

>From the "Green Book" I understand that WITH is an extension of the
relational operator IS.

Wikipedia does not show an example of the use of IS in comparison to the
WITH method.
It says;
[QUOTE]
A third approach [of Run-time type checking] is possible using the IS
operator. This is a relation operator with the same precedence as equals
(=), greater(>), etc. but which tests dynamic type. Unlike the two other
approaches, however, it does not allow the programmer access to the
subtype that has been detected.
[END QUOTE]

Any suggestions for some example code to clarify this?

Greets,
F.P. Vonck













More information about the Oberon mailing list