]> git.mdlowis.com Git - proto/obnc.git/commitdiff
updated spec based on current implementation
authorMichael D. Lowis <mike.lowis@gentex.com>
Mon, 12 Apr 2021 20:28:16 +0000 (16:28 -0400)
committerMichael D. Lowis <mike.lowis@gentex.com>
Mon, 12 Apr 2021 20:28:16 +0000 (16:28 -0400)
Oberon.html

index db7db8640bb39e61fd013273264a9df80217d1ad..673b64917bc8fa1fab882161579aa483b3b1f94a 100644 (file)
@@ -1,7 +1,7 @@
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<!-- saved from url=(0049)https://miasap.se/obnc/oberon-report.html#sec10.2 -->
+<!-- saved from url=(0049)#sec10.2 -->
 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-        
+
         <meta name="author" content="Niklaus Wirth">
         <meta name="viewport" content="width=device-width, initial-scale=1.0">
         <title>The Programming Language Oberon</title>
 
         <h2 class="toc">Table of Contents</h2>
 
-        <ol>
-            <li><a href="https://miasap.se/obnc/oberon-report.html#preface">Preface</a></li>
-            <li><a href="https://miasap.se/obnc/oberon-report.html#sec1">History and introduction</a></li>
-            <li><a href="https://miasap.se/obnc/oberon-report.html#sec2">Syntax</a></li>
-            <li><a href="https://miasap.se/obnc/oberon-report.html#sec3">Vocabulary</a></li>
-            <li><a href="https://miasap.se/obnc/oberon-report.html#sec4">Declarations and scope rules</a></li>
-            <li><a href="https://miasap.se/obnc/oberon-report.html#sec5">Constant declarations</a></li>
-            <li><a href="https://miasap.se/obnc/oberon-report.html#sec6">Type declarations</a></li>
-            <li><a href="https://miasap.se/obnc/oberon-report.html#sec7">Variable declarations</a></li>
-            <li><a href="https://miasap.se/obnc/oberon-report.html#sec8">Expressions</a></li>
-            <li><a href="https://miasap.se/obnc/oberon-report.html#sec9">Statements</a></li>
-            <li><a href="https://miasap.se/obnc/oberon-report.html#sec10">Procedure declarations</a></li>
-            <li><a href="https://miasap.se/obnc/oberon-report.html#sec11">Modules</a></li>
+        <ul>
+            <li><a href="#preface">Preface</a></li>
+            <li><a href="#sec1">1. History and introduction</a></li>
+            <li><a href="#sec2">2. Syntax</a></li>
+            <li><a href="#sec3">3. Vocabulary</a></li>
+            <li><a href="#sec4">4. Declarations and scope rules</a></li>
+            <li><a href="#sec5">5. Constant declarations</a></li>
+            <li><a href="#sec6">6. Type declarations</a></li>
+            <li><a href="#sec7">7. Variable declarations</a></li>
+            <li><a href="#sec8">8. Expressions</a></li>
+            <li><a href="#sec9">9. Statements</a></li>
+            <li><a href="#sec10">10. Procedure declarations</a></li>
+            <li><a href="#sec11">11. Modules</a></li>
+            <li><a href="#appendix">Appendix: The Syntax of Oberon</a></li>
         </ol>
 
-        <p>Appendix: <a href="https://miasap.se/obnc/oberon-report.html#appendix">The Syntax of Oberon</a></p>
-
-        <h2><a name="sec1">Preface</a></h2>
+        <h2><a name="preface">Preface</a></h2>
 
         <p>This document started as a direct copy of Niklaus Wirth's Oberon07 specification that has been incrementally revised and refactored to create an essentially new language. Most of the changes are cosmetic and serve to "modernize" the language. The changes so far ar as follows:
             <ul>
                 <li>Removed the SET types and associated operators</li>
                 <li>Changed not equal operator from '#' to '!='</li>
             </ul>
-        </p> 
+        </p>
 
-        <p></p>                
+        <p></p>
 
         <h2><a name="sec1">1. Introduction</a></h2>
 
@@ -359,7 +358,7 @@ digit = "0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9".
 identdef = ident ["*"].
 </pre>
 
-        <p>The following identifiers are predefined; their meaning is defined in <a href="https://miasap.se/obnc/oberon-report.html#sec6.1">section 6.1</a> (types) or <a href="https://miasap.se/obnc/oberon-report.html#sec10.2">10.2</a> (procedures):</p>
+        <p>The following identifiers are predefined; their meaning is defined in <a href="#sec6.1">section 6.1</a> (types) or <a href="#sec10.2">10.2</a> (procedures):</p>
 
         <div class="table">
             <table>
@@ -376,7 +375,7 @@ identdef = ident ["*"].
                     <td>Byte</td>
                     <td>Char</td>
                                 </tr>
-                                        
+
                 <tr>
                     <td>Decrement</td>
                     <td>Floor</td>
@@ -400,7 +399,7 @@ identdef = ident ["*"].
 ConstExpression = expression.
 </pre>
 
-        <p>A constant expression can be evaluated by a mere textual scan without actually executing the program. Its operands are constants (see <a href="https://miasap.se/obnc/oberon-report.html#sec8">Ch. 8</a>). Examples of constant declarations are:</p>
+        <p>A constant expression can be evaluated by a mere textual scan without actually executing the program. Its operands are constants (see <a href="#sec8">Ch. 8</a>). Examples of constant declarations are:</p>
 
         <pre>N = 100
 </pre>
@@ -408,9 +407,6 @@ ConstExpression = expression.
         <pre>limit = 2*N - 1
 </pre>
 
-        <pre>all = {0 .. WordSize - 1}
-</pre>
-
         <pre>name = "Oberon"
 </pre>
 
@@ -424,7 +420,7 @@ type = qualident | ArrayType | RecordType | PointerType | ProcedureType.
 
         <p>Examples:</p>
 
-        <pre>Table = ARRAY N OF REAL
+        <pre>Table = ARRAY N OF Real
 </pre>
 
         <pre>Tree = POINTER TO Node
@@ -436,7 +432,7 @@ END
 </pre>
 
         <pre>CenterNode = RECORD (Node)
-    name: ARRAY 32 OF CHAR;
+    name: ARRAY 32 OF Char;
     subnode: Tree
 END
 </pre>
@@ -446,7 +442,7 @@ END
 
         <h3><a name="sec6.1">6.1. Basic types</a></h3>
 
-        <p>The following basic types are denoted by predeclared identifiers. The associated operators are defined in <a href="https://miasap.se/obnc/oberon-report.html#sec8.2">8.2</a>, and the predeclared function procedures in <a href="https://miasap.se/obnc/oberon-report.html#sec10.2">10.2</a>. The values of a given basic type are the following:</p>
+        <p>The following basic types are denoted by predeclared identifiers. The associated operators are defined in <a href="#sec8.2">8.2</a>, and the predeclared function procedures in <a href="#sec10.2">10.2</a>. The values of a given basic type are the following:</p>
 
         <div class="dl">
             <dl>
@@ -495,12 +491,12 @@ length = ConstExpression.
         <pre>ARRAY N OF Int
 </pre>
 
-        <pre>ARRAY 10, 20 OF REAL
+        <pre>ARRAY 10, 20 OF Real
 </pre>
 
         <h3><a name="sec6.3">6.3. Record types</a></h3>
 
-        <p>A record type is a structure consisting of a fixed number of elements of possibly different types. The record type declaration specifies for each element, called <dfn>field</dfn>, its type and an identifier which denotes the field. The scope of these field identifiers is the record definition itself, but they are also visible within field designators (see <a href="https://miasap.se/obnc/oberon-report.html#sec8.1">8.1</a>) referring to elements of record variables.</p>
+        <p>A record type is a structure consisting of a fixed number of elements of possibly different types. The record type declaration specifies for each element, called <dfn>field</dfn>, its type and an identifier which denotes the field. The scope of these field identifiers is the record definition itself, but they are also visible within field designators (see <a href="#sec8.1">8.1</a>) referring to elements of record variables.</p>
 
         <pre>RecordType = RECORD ["(" BaseType ")"] [FieldListSequence] END.
 BaseType = qualident.
@@ -522,9 +518,9 @@ END
 </pre>
 
         <pre>RECORD
-    name, firstname: ARRAY 32 OF CHAR;
+    name, firstname: ARRAY 32 OF Char;
     age: Int;
-    salary: REAL
+    salary: Real
 END
 </pre>
 
@@ -537,11 +533,11 @@ END
 
         <p>If a type <var>P</var> is defined as POINTER TO <var>T</var>, the identifier <var>T</var> can be declared textually following the declaration of <var>P</var>, but [if so] it must lie within the same scope.</p>
 
-        <p>If <var>p</var> is a variable of type <var>P</var> = POINTER TO <var>T</var>, then a call of the predefined procedure NEW(<var>p</var>) has the following effect (see <a href="https://miasap.se/obnc/oberon-report.html#sec10.2">10.2</a>): A variable of type <var>T</var> is allocated in free storage, and a pointer to it is assigned to <var>p</var>. This pointer <var>p</var> is of type <var>P</var> and the referenced variable <var>p</var>^ is of type <var>T</var>. Failure of allocation results in <var>p</var> obtaining the value NIL. Any pointer variable may be assigned the value NIL, which points to no variable at all.</p>
+        <p>If <var>p</var> is a variable of type <var>P</var> = POINTER TO <var>T</var>, then a call of the predefined procedure NEW(<var>p</var>) has the following effect (see <a href="#sec10.2">10.2</a>): A variable of type <var>T</var> is allocated in free storage, and a pointer to it is assigned to <var>p</var>. This pointer <var>p</var> is of type <var>P</var> and the referenced variable <var>p</var>^ is of type <var>T</var>. Failure of allocation results in <var>p</var> obtaining the value NIL. Any pointer variable may be assigned the value NIL, which points to no variable at all.</p>
 
         <h3><a name="sec6.5">6.5. Procedure types</a></h3>
 
-        <p>Variables of a procedure type <var>T</var> have a procedure (or NIL) as value. If a procedure <var>P</var> is assigned to a procedure variable of type <var>T</var>, the (types of the) formal parameters of <var>P</var> must be the same as those indicated in the formal parameters of <var>T</var>. The same holds for the result type in the case of a function procedure (see <a href="https://miasap.se/obnc/oberon-report.html#sec10.1">10.1</a>). <var>P</var> must not be declared local to another procedure, and neither can it be a standard procedure.</p>
+        <p>Variables of a procedure type <var>T</var> have a procedure (or NIL) as value. If a procedure <var>P</var> is assigned to a procedure variable of type <var>T</var>, the (types of the) formal parameters of <var>P</var> must be the same as those indicated in the formal parameters of <var>T</var>. The same holds for the result type in the case of a function procedure (see <a href="#sec10.1">10.1</a>). <var>P</var> must not be declared local to another procedure, and neither can it be a standard procedure.</p>
 
         <pre>ProcedureType = PROCEDURE [FormalParameters].
 </pre>
@@ -553,27 +549,25 @@ END
         <pre>VariableDeclaration = IdentList ":" type.
 </pre>
 
-        <p>Variables whose identifiers appear in the same list are all of the same type. Examples of variable declarations (refer to examples in <a href="https://miasap.se/obnc/oberon-report.html#sec6">Ch. 6</a>):</p>
+        <p>Variables whose identifiers appear in the same list are all of the same type. Examples of variable declarations (refer to examples in <a href="#sec6">Ch. 6</a>):</p>
 
         <pre>i, j, k: Int
 </pre>
 
-        <pre>x, y: REAL
+        <pre>x, y: Real
 </pre>
 
-        <pre>p, q: BOOLEAN
-</pre>
-        <pre>s: SET
+        <pre>p, q: Bool
 </pre>
 
         <pre>f: Function
 </pre>
 
-        <pre>a: ARRAY 100 OF REAL
+        <pre>a: ARRAY 100 OF Real
 </pre>
 
         <pre>w: ARRAY 16 OF
-    RECORD ch: CHAR;
+    RECORD ch: Char;
         count: Int
     END
 </pre>
@@ -587,7 +581,7 @@ END
 
         <h3><a name="sec8.1">8.1. Operands</a></h3>
 
-        <p>With the exception of sets and literal constants, i.e. numbers and strings, operands are denoted by <dfn>designators</dfn>. A designator consists of an identifier referring to the constant, variable, or procedure to be designated. This identifier may possibly be qualified by module identifiers (see <a href="https://miasap.se/obnc/oberon-report.html#sec4">Ch. 4</a> and <a href="https://miasap.se/obnc/oberon-report.html#sec11">11</a>), and it may be followed by selectors, if the designated object is an element of a structure.</p>
+        <p>With the exception of sets and literal constants, i.e. numbers and strings, operands are denoted by <dfn>designators</dfn>. A designator consists of an identifier referring to the constant, variable, or procedure to be designated. This identifier may possibly be qualified by module identifiers (see <a href="#sec4">Ch. 4</a> and <a href="#sec11">11</a>), and it may be followed by selectors, if the designated object is an element of a structure.</p>
 
         <p>If <var>A</var> designates an array, then <var>A</var>[<var>E</var>] denotes that element of <var>A</var> whose index is the current value of the expression <var>E</var>. The type of <var>E</var> must be of type Int. A designator of the form <var>A</var>[<var>E1</var>, <var>E2</var>, ... , <var>En</var>] stands for <var>A</var>[<var>E1</var>][<var>E2</var>] ... [<var>En</var>]. If <var>p</var> designates a pointer variable, <var>p</var>^ denotes the variable which is referenced by <var>p</var>. If <var>r</var> designates a record, then <var>r</var>.<var>f</var> denotes the field <var>f</var> of <var>r</var>. If <var>p</var> designates a pointer, <var>p</var>.<var>f</var> denotes the field <var>f</var> of the record <var>p</var>^, i.e. the dot implies dereferencing and <var>p</var>.<var>f</var> stands for <var>p</var>^.<var>f</var>.</p>
 
@@ -603,9 +597,9 @@ selector = "." ident | "[" ExpList "]" | "^" | "(" qualident ")".
 ExpList = expression {"," expression}.
 </pre>
 
-        <p>If the designated object is a variable, then the designator refers to the variable's current value. If the object is a procedure, a designator without parameter list refers to that procedure. If it is followed by a (possibly empty) parameter list, the designator implies an activation of the procedure and stands for the value resulting from its execution. The (types of the) actual parameters must correspond to the formal parameters as specified in the procedure's declaration (see <a href="https://miasap.se/obnc/oberon-report.html#sec10">Ch. 10</a>).</p>
+        <p>If the designated object is a variable, then the designator refers to the variable's current value. If the object is a procedure, a designator without parameter list refers to that procedure. If it is followed by a (possibly empty) parameter list, the designator implies an activation of the procedure and stands for the value resulting from its execution. The (types of the) actual parameters must correspond to the formal parameters as specified in the procedure's declaration (see <a href="#sec10">Ch. 10</a>).</p>
 
-        <p>Examples of designators (see examples in <a href="https://miasap.se/obnc/oberon-report.html#sec7">Ch. 7</a>):</p>
+        <p>Examples of designators (see examples in <a href="#sec7">Ch. 7</a>):</p>
 
         <div class="table">
             <table>
@@ -615,11 +609,11 @@ ExpList = expression {"," expression}.
                 </tr>
                 <tr>
                     <td class="first">a[i]</td>
-                    <td class="last">(REAL)</td>
+                    <td class="last">(Real)</td>
                 </tr>
                 <tr>
                     <td class="first">w[3].ch</td>
-                    <td class="last">(CHAR)</td>
+                    <td class="last">(Char)</td>
                 </tr>
                 <tr>
                     <td class="first">t.key</td>
@@ -673,7 +667,7 @@ ActualParameters = "(" [ExpList] ")" .
             </tbody></table>
         </div>
 
-        <p>These operators apply to BOOLEAN operands and yield a BOOLEAN result.</p>
+        <p>These operators apply to Bool operands and yield a Bool result.</p>
 
         <div class="table">
             <table>
@@ -776,7 +770,7 @@ ActualParameters = "(" [ExpList] ")" .
             </tbody></table>
         </div>
 
-        <p>Relations are Boolean. The ordering relations &lt;, &lt;=, &gt;, &gt;= apply to the numeric types, CHAR, and character arrays. The relations = and # also apply to the types BOOLEAN, SET, and to pointer and procedure types.</p>
+        <p>Relations are Boolean. The ordering relations &lt;, &lt;=, &gt;, &gt;= apply to the numeric types, Char, and character arrays. The relations = and # also apply to the types Bool, SET, and to pointer and procedure types.</p>
 
         <p><var>v</var> IS <var>T</var> stands for “<var>v</var> is of type <var>T</var>” and is called a <dfn>type test</dfn>. It is applicable, if</p>
 
@@ -787,7 +781,7 @@ ActualParameters = "(" [ExpList] ")" .
 
         <p>Assuming, for instance, that <var>T</var> is an extension of <var>T0</var> and that <var>v</var> is a designator declared of type <var>T0</var>, then the test <var>v</var> IS <var>T</var> determines whether the actually designated variable is (not only a <var>T0</var>, but also) a <var>T</var>. The value of NIL IS <var>T</var> is undefined.</p>
 
-        <p>Examples of expressions (refer to examples in <a href="https://miasap.se/obnc/oberon-report.html#sec7">Ch. 7</a>):</p>
+        <p>Examples of expressions (refer to examples in <a href="#sec7">Ch. 7</a>):</p>
 
         <div class="table">
             <table>
@@ -801,7 +795,7 @@ ActualParameters = "(" [ExpList] ")" .
                 </tr>
                 <tr>
                     <td class="first">~p OR q</td>
-                    <td class="last">(BOOLEAN)</td>
+                    <td class="last">(Bool)</td>
                 </tr>
                 <tr>
                     <td class="first">(i+j) * (i-j)</td>
@@ -809,19 +803,19 @@ ActualParameters = "(" [ExpList] ")" .
                 </tr>
                 <tr>
                     <td class="first">a[i+j] * a[i-j]</td>
-                    <td class="last">(REAL)</td>
+                    <td class="last">(Real)</td>
                 </tr>
                 <tr>
                     <td class="first">(0&lt;=i) &amp; (i&lt;100)</td>
-                    <td class="last">(BOOLEAN)</td>
+                    <td class="last">(Bool)</td>
                 </tr>
                 <tr>
                     <td class="first">t.key = 0</td>
-                    <td class="last">(BOOLEAN)</td>
+                    <td class="last">(Bool)</td>
                 </tr>
                 <tr>
                     <td class="first">t IS CenterNode</td>
-                    <td class="last">(BOOLEAN)</td>
+                    <td class="last">(Bool)</td>
                 </tr>
             </tbody></table>
         </div>
@@ -847,12 +841,12 @@ ActualParameters = "(" [ExpList] ")" .
 
         <ol>
             <li>The constant NIL can be assigned to variables of any pointer or procedure type.</li>
-            <li>Strings can be assigned to any array of characters, provided the number of characters in the 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.</li>
+            <li>Strings can be assigned to any array of characters, provided the number of characters in the 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.</li>
             <li>In the case of records, the type of the source must be an extension of the type of the destination.</li>
             <li>An open array may be assigned to an array of equal base type.</li>
         </ol>
 
-        <p>Examples of assignments (see examples in <a href="https://miasap.se/obnc/oberon-report.html#sec7">Ch. 7</a>):</p>
+        <p>Examples of assignments (see examples in <a href="#sec7">Ch. 7</a>):</p>
 
         <pre>i := 0
 </pre>
@@ -860,7 +854,7 @@ ActualParameters = "(" [ExpList] ")" .
         <pre>p := i = j
 </pre>
 
-        <pre>x := FLT(i + 1)
+        <pre>x := AsFloat(i + 1)
 </pre>
 
         <pre>k := (i + j) DIV 2
@@ -869,9 +863,6 @@ ActualParameters = "(" [ExpList] ")" .
         <pre>f := log2
 </pre>
 
-        <pre>s := {2, 3, 5, 7, 11, 13}
-</pre>
-
         <pre>a[i] := (x+y) * (x-y)
 </pre>
 
@@ -883,9 +874,9 @@ ActualParameters = "(" [ExpList] ")" .
 
         <h3><a name="sec9.2">9.2. Procedure calls</a></h3>
 
-        <p>A procedure call serves to activate a procedure. The procedure call may contain a list of actual parameters which are substituted in place of their corresponding formal parameters defined in the procedure declaration (see <a href="https://miasap.se/obnc/oberon-report.html#sec10">Ch. 10</a>). The correspondence is established by the positions of the parameters in the lists of actual and formal parameters respectively. There exist two kinds of parameters: <dfn>variable</dfn> and <dfn>value</dfn> parameters.</p>
+        <p>A procedure call serves to activate a procedure. The procedure call may contain a list of actual parameters which are substituted in place of their corresponding formal parameters defined in the procedure declaration (see <a href="#sec10">Ch. 10</a>). The correspondence is established by the positions of the parameters in the lists of actual and formal parameters respectively. There exist two kinds of parameters: <dfn>variable</dfn> and <dfn>value</dfn> parameters.</p>
 
-        <p>In the case of variable parameters, the actual parameter must be a designator denoting a variable. If it designates an element of a structured variable, the selector is evaluated when the formal/actual parameter substitution takes place, i.e. before the execution of the procedure. If the parameter is a value parameter, the corresponding actual parameter must be an expression. This expression is evaluated prior to the procedure activation, and the resulting value is assigned to the formal parameter which now constitutes a local variable (see also <a href="https://miasap.se/obnc/oberon-report.html#sec10.1">10.1</a>.).</p>
+        <p>In the case of variable parameters, the actual parameter must be a designator denoting a variable. If it designates an element of a structured variable, the selector is evaluated when the formal/actual parameter substitution takes place, i.e. before the execution of the procedure. If the parameter is a value parameter, the corresponding actual parameter must be an expression. This expression is evaluated prior to the procedure activation, and the resulting value is assigned to the formal parameter which now constitutes a local variable (see also <a href="#sec10.1">10.1</a>.).</p>
 
         <pre>ProcedureCall = designator [ActualParameters].
 </pre>
@@ -896,7 +887,7 @@ ActualParameters = "(" [ExpList] ")" .
             <table>
                 <tbody><tr>
                     <td class="first">ReadInt(i)</td>
-                    <td class="last">(see <a href="https://miasap.se/obnc/oberon-report.html#sec10">Ch. 10</a>)</td>
+                    <td class="last">(see <a href="#sec10">Ch. 10</a>)</td>
                 </tr>
                 <tr>
                     <td class="first">WriteInt(2*j + 1, 6)</td>
@@ -932,7 +923,7 @@ END
 
         <h3><a name="sec9.5">9.5. Case statements</a></h3>
 
-        <p>Case statements specify the selection and execution of a statement sequence according to the value of an expression. First the case expression is evaluated, then the statement sequence is executed whose case label list contains the obtained value. If the case expression is of type Int or CHAR, all labels must be integers or single-character strings, respectively.</p>
+        <p>Case statements specify the selection and execution of a statement sequence according to the value of an expression. First the case expression is evaluated, then the statement sequence is executed whose case label list contains the obtained value. If the case expression is of type Int or Char, all labels must be integers or single-character strings, respectively.</p>
 
         <pre>CaseStatement = CASE expression OF case {"|" case} END.
 case = [CaseLabelList ":" StatementSequence].
@@ -958,7 +949,7 @@ case labels must be extensions of <var>T</var>, and in the statements <var>Si</v
 
         <pre>TYPE R = RECORD a: Int END;
     R0 = RECORD (R) b: Int END;
-    R1 = RECORD (R) b: REAL END;
+    R1 = RECORD (R) b: Real END;
     R2 = RECORD (R) b: SET END;
     P = POINTER TO R;
     P0 = POINTER TO R0;
@@ -1086,7 +1077,7 @@ FormalType = {ARRAY OF} qualident.
         <p>Examples of procedure declarations:</p>
 
         <pre>PROCEDURE ReadInt(VAR x: Int);
-    VAR i: Int; ch: CHAR;
+    VAR i: Int; ch: Char;
 BEGIN i := 0; Read(ch);
     WHILE ("0" &lt;= ch) &amp; (ch &lt;= "9") DO
         i := 10*i + (ORD(ch) - ORD("0")); Read(ch)
@@ -1247,12 +1238,12 @@ Import = ident [":=" ident].
     IMPORT Texts, Oberon;
     VAR W: Texts.Writer;
 
-    PROCEDURE Write*(ch: CHAR);
+    PROCEDURE Write*(ch: Char);
     BEGIN Texts.Write(W, ch)
     END;
 
     PROCEDURE WriteInt*(x, n: Int);
-        VAR i: Int; a: ARRAY 16 OF CHAR;
+        VAR i: Int; a: ARRAY 16 OF Char;
     BEGIN i := 0;
         IF x &lt; 0 THEN Texts.Write(W, "-"); x := -x END ;
         REPEAT a[i] := CHR(x MOD 10 + ORD("0")); x := x DIV 10; INC(i) UNTIL x = 0;
@@ -1361,6 +1352,6 @@ FormalType = {ARRAY OF} qualident.
 ImportList = IMPORT import {"," import} ";".
 import = ident [":=" ident].
 </pre>
-    
+
 
 </body></html>