Oberon-2
From Free net encyclopedia
Oberon-2 is a true extension of the Oberon programming language. It adds the FOR loop and type bound procedures which are to Oberon what classes are to other object oriented programming languages. It was developed at ETH-Zürich by Niklaus Wirth and Hanspeter Mössenböck, who is now at Institut für Systemsoftware (SSW) of the University of Linz, Austria.
A superset of Oberon-1, Oberon-2 was developed by H. Moessenboeck in 1991 to add object-orientation. Oberon-2 was a redesign of Object Oberon. The extensions to Oberon are:
- Type-bound procedures
- Procedures can be bound to a record (or pointer) type. They are equivalent to methods in object-oriented terminology.
- Read-only export
- The use of exported variables and record fields can be restricted to read-only access.
- Open arrays
- Open arrays may not only be declared as formal parameter types but also as pointer base types.
- With statement
- The With statement (a regional type guard) can be written with variants.
- Note that the form of With statement used in Oberon is unrelated to the Pascal and Modula-2 With statement. This method of abbreviating access to record fields is not implemented in Oberon or Oberon-2.
- For statement
- The For statement of Pascal and Modula-2 was not implemented in Oberon. It is reintroduced in Oberon-2.
Implementations
Oberon-2 compilers maintained by ETH include versions for Windows, Linux, Solaris, Mac OS X.
There is an Oberon-2 Lex scanner and Yacc parser by Stephen J Bevan of Manchester University, UK, based on the one in the Mössenböck and Wirth reference. It is at version 1.4.
References
- "The Programming Language Oberon-2", H. Mössenböck, N. Wirth, Institut für Computersysteme, ETH Zürich, January 1992.
- "Second International Modula-2 Conference", Sept 1991.
External links
- Oberon Reference page at ETH-Zürich
- Oberon at SSW, Linz
- Language Report
- Pow Course - by Dan Popa (Romanian version)
- ftp://ftp.inf.ethz.ch/pub/Oberon/.
- This article was originally based on material from the Free On-line Dictionary of Computing, which is licensed under the GFDL.