Oberon (programming language)

Oberon, in 2000 officially renamed the ETH Oberon, is a technology developed by Niklaus Wirth and Jürg Gutknecht, object-oriented, strictly structured programming language. She is the also designed by Wirth predecessors Pascal and Modula -2 quite similar, but more structured than Pascal and powerful, but at the same time considerably less extensive than Modula -2. The ETH Oberon System is an independent operating system of the ETH Zurich, which is implemented in the Oberon language, served as the basis for development of the language and as the compiler is available for free.

Oberon was - like its predecessor Modula-2 - parallel to a workstation ( Ceres ) was developed.

Oberon took place after its release quite fast among others for educational purposes in schools and universities use. There are however, now become based on Oberon, also freely available tools that are also used commercially, such as the programming language Component Pascal and the development environment BlackBox Component Builder.

The advantages of Oberon are particularly in modular construction, the great security and the simplicity of the language that can be clearly defined and relatively short (see EBNF ). With Oberon, it is very easy and safe to divide the programming to various persons and together the work later.

Hans Peter Mössenböck Oberon has evolved with few changes to the programming language Oberon -2, and in addition essentially explicitly type-bound procedures were allowed, so that the objects do not have to be implicitly included in the formal parameter list of the method. Furthermore, the export brand was "-" introduced ( as an alternative to "*" ) to suppress write access to objects or their components.

The source code of the compiler are freely available in the rule. There are different program development environments, can be mentioned, for example, POW! . [Web 1] In addition to use as a programming language and the use as an operating system ( Native Oberon ) is possible.

Code examples

Hello World in Ulm OBERON system:

MODULE HelloWorld;      IMPORT Write;      BEGIN        Write.Line ("Hello World ");      END Hello World. Unlike other full-fledged object- oriented programming languages, the source code is (for example, Java), but usually in a single compiler pass very quickly translated into machine language is not interpreted (eg Ruby ) or translated into bytecode. The compiled code is type safe, and memory range checks are mandatory. The use of run-time debuggers and program instructions for deallocation of pointer variable is obsolete. However, it is possible to set breakpoints ( HALT instruction ) and also all local variables after the termination of the program to analyze. Global variables can be analyzed at any time in the runtime system. The development times with Oberon are very short, and the machine code is still very efficient and robust. And real-time applications can be implemented using Oberon.

The Oberon programming language is characterized by the fact that, in contrast for example to C , among others, with an integrated run-time system Oberon system and an automatic garbage collection (garbage collection ) fully supports object-oriented architecture. In multiple inheritance was deliberately omitted in order to relieve the compiler of complex administrative tasks and to keep the programmer from unexpected results related to the Diamond problem.

Object-oriented programming is RECORD achieved with advanced data networks of data type. The definition of methods is type-bound procedures, and the definition of visibility is through export marks (" *" for write access and "-" for read access ) obtained. Example in Oberon -2:

MODULE Vererbung1;     TYPE        Graphical object * = POINTER TO Graphical Object Description;      Graphical Description = RECORD color *: LONGINT; END;        Point * = POINTER TO point description;      Item Description = RECORD (graphical object) x *, y *: LONGINT; END;        Line * = POINTER TO line description;      Line Description = RECORD (graphical object) Xstart *, yStart *, * xEnde, Yende *: LONGINT; END;     PROCEDURE ( point: Point ) Draw *;   BEGIN      ...   END Draw;     PROCEDURE ( line: line ) Draw *;   BEGIN      ...   END Draw;     VAR        point1: Point;      Line 1: Line;     BEGIN        NEW ( point1 );      punkt1.x: = 1;      punkt1.y: = 1;      punkt1.Zeichne ();        NEW ( line1 );      linie1.xStart: = 1;      linie1.yStart: = 1;      linie1.xEnde: = 2;      linie1.yEnde: = 2;      linie1.Zeichne ();     END Vererbung1. Attributes that have only read access, (methods) can be changed by type-bound procedures. example:

MODULE Vererbung2;     TYPE        Object * = POINTER TO object description;      Description = RECORD x: INTEGER; END;     PROCEDURE (object: Object ) SetzeX * (value: INTEGER );   BEGIN      objekt.x: = value;   END SetzeX;     VAR        object1: Object;      int: INTEGER;     BEGIN        NEW ( object1 );      objekt1.SetzeX (1);      int: = objekt1.x;     END Vererbung2. developments

Based on Oberon and Oberon -2 programming the Component Pascal, Active Oberon and Zonnon have emerged.

612569
de