Paste number 315134: Oberon-07 2016-05-01

Paste number 315134: Oberon-07 2016-05-01
Pasted by: pdw
When:4 years, 2 months ago
Share:Tweet this! | http://paste.lisp.org/+6R5Q
Channel:None
Paste contents:
Raw Source | XML | Display As
--- old.txt	2016-05-01 14:25:17.925910136 +0200
+++ new.txt	2016-05-01 14:25:17.925910136 +0200
@@ -1,5 +1,5 @@
                    The Programming Language Oberon
-                                 Revision 1.10.2013 / 4.3.2016
+                                 Revision 1.10.2013 / 1.5.2016
                                             Niklaus Wirth
                      Make it as simple as possible, but not simpler. (A. Einstein)
 
@@ -26,7 +26,7 @@
 to serve as a reference for programmers, implementors, and manual writers. What remains unsaid
 is mostly left so intentionally, either because it is derivable from stated rules of the language, or
 because it would unnecessarily restrict the freedom of implementors.
-This document describes the language defined in 1988/90 as revised in 2007/11.
+This document describes the language defined in 1988/90 as revised in 2007 / 2016.
 
 2. Syntax
 A language is an infinite set of sentences, namely the sentences well formed according to its
@@ -138,11 +138,10 @@
 A data type determines the set of values which variables of that type may assume, and the
 operators that are applicable. A type declaration is used to associate an identifier with a type. The
 types define the structure of variables of this type and, by implication, the operators that are
-applicable to components. There are two different structures, namely arrays and records, with
+applicable to components. There are two different data structures, namely arrays and records, with
 different component selectors.
-        TypeDeclaration = identdef "=" StrucType.
-        StrucType = ArrayType | RecordType | PointerType | ProcedureType.
-        type = qualident | StrucType.
+        TypeDeclaration = identdef "=" type.
+        type = qualident | ArrayType | RecordType | PointerType | ProcedureType.
 Examples:
         Table          =      ARRAY N OF REAL
         Tree           =      POINTER TO Node
@@ -387,9 +386,10 @@
 hold:
 1. The constant NIL can be assigned to variables of any pointer or procedure type.
 2. Strings can be assigned to any array of characters, provided the number of characters in the
-  string is not greater than that of the array. If it is less, a null character (0X) is appended. Single-
-  character strings can also be assigned to variables of type CHAR.
+  string is less than that of the array. (A null character is appended). Single-character strings can
+  also be assigned to variables of type CHAR.
 3. In the case of records, the type of the source must be an extension of the type of the destination.
+4. An open array may be assigned to an array of equal base type.
 Examples of assignments (see examples in Ch. 7):
         i := 0
         p := i = j
@@ -718,7 +718,7 @@
         ADC(m, n)       INTEGER              INTEGER             add with carry C
         SBC(m, n)       INTEGER              INTEGER             subtract with carry C
         UML(m, n)       INTEGER              INTEGER             unsigned multiplication
-        COND(n)         INTEGER              BOOLEAN             IF Cond(8) THEN ...
+        COND(n)         INTEGER              BOOLEAN             IF Cond(n) THEN ...
 
 Proper procedures:
         Name            Argument types                           Function
@@ -743,9 +743,8 @@
     string = """ {character} """ | digit {hexDigit} "X".
     ConstDeclaration = identdef "=" ConstExpression.
     ConstExpression = expression.
-    TypeDeclaration = identdef "=" StrucType.
-    StrucType = ArrayType | RecordType | PointerType | ProcedureType.
-    type = qualident | StrucType.
+    TypeDeclaration = identdef "=" type.
+    type = qualident | ArrayType | RecordType | PointerType | ProcedureType.
     ArrayType = ARRAY length {"," length} OF type.
     length = ConstExpression.
     RecordType = RECORD ["(" BaseType ")"] [FieldListSequence] END.

This paste has no annotations.

Colorize as:
Show Line Numbers

Lisppaste pastes can be made by anyone at any time. Imagine a fearsomely comprehensive disclaimer of liability. Now fear, comprehensively.