[Oberon] Oberon Wiki ; what happend with WITH
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?
I found the following flaw in the "Type binding" section
Bird* = RECORD
sound* : ARRAY 10 OF CHAR;
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
>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
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.
Any suggestions for some example code to clarify this?
More information about the Oberon