Solo disponible en BuenasTareas
  • Páginas : 4 (968 palabras )
  • Descarga(s) : 0
  • Publicado : 7 de julio de 2010
Leer documento completo
Vista previa del texto

Differences between Oberon-07 and Oberon
Niklaus Wirth, 8.8.2007 / 17.12.2007 Oberon-07 is a revision of the original language Oberon as defined in 1988/1990. It is accepted by the compilerrecently completed for the ARM processor. Most changes in the language might easily be called features of a dialect. However, there are a few that merit a stronger distinction, because they should beconsidered as permanent, and as corrections of unsatisfactory properties of the original Oberon. These are the elimination of the loop statement, function result specification, array assignments,constant parameters, and read-only import of variables. All changes were made in the interest of regularity, simplicity, completeness, and wellstructuredness. 1. The Loop and the While statements. It hadbeen thought that the while statement with the termination condition at its entry, and the repeat statement with the termination condition at its end must be amended by a general and flexible constructwith termination conditions anywhere. The loop statement with its exit statements represents, however, a break with the idea of a structured language, where properties of a statement can be derivedfrom those of its components. The loop statement with its syntactically unconnected exit statements does not allow this. It has therefore been deleted from the language together with the associated exitstatement. As a sort of compensation the flexibility of the while statement has been enhanced. Its extended syntax is WhileStatement = "WHILE" expression "DO" StatementSequence {“ELSIF” expression"DO" StatementSequence} "END". As long as any of the Boolean expressions yields TRUE, the corresponding statement sequence is executed. Repetition terminates, when all conditions are false. This isDijkstra’s form. His favourite example was a simple form of the Euclidean algorithm to compute the greatest common divisor of m and n: WHILE m > n DO m := m – n ELSIF n > m DO n := n – m END 2. The Case...
tracking img