Author: cpage
Date: Thu Dec 22 13:59:55 2005
New Revision: 10435
Modified:
trunk/www/books/drm/Collection_Operations.html
trunk/www/books/drm/Constructing_and_Initializing_Instances.html
trunk/www/books/drm/Define_Sealed_Domain.html
trunk/www/books/drm/Definition_Macros.html
trunk/www/books/drm/Function_Application.html
trunk/www/books/drm/Functions_Overview.html
trunk/www/books/drm/Limited_Types.html
trunk/www/books/drm/Parameter_Lists.html
trunk/www/books/drm/Reflective_Operations_on_Functions.html
trunk/www/books/drm/Statement_Macros.html
trunk/www/books/drm/Title.html
trunk/www/books/drm/Union_Types.html
Log:
Job: website
After consulting with Andrew Shalit, I have fixed all the semantically
significant errata in the online DRM. I've updated the wording of the
inline errata notes to describe the errors as they exist in the published
book, and I've moved them out of the way, to the end of the region where
the error occurs.
I also updated the notice on the title page to indicate that this online
version contains corrections (it used to indicate the opposite, that most
of the errors were intact).
Going forward, we will fix all the errors encountered and note the
significant ones. Errors that exist in the published book should still be
added to the Errata page to make sure they're recorded.
Modified: trunk/www/books/drm/Collection_Operations.html
==============================================================================
--- trunk/www/books/drm/Collection_Operations.html (original)
+++ trunk/www/books/drm/Collection_Operations.html Thu Dec 22 13:59:55 2005
@@ -1483,10 +1483,6 @@
<p>Sets the tail of <var>pair</var> to contain <var>object</var> and
returns <var>object</var>.</p>
<p><var>pair</var> is modified by this operation.</p>
- <p class="errata right"><a href="Errata#p309_1"
-
name="errata_p309_1"><strong>Errata:</strong></a> The
- final value of <code>x</code> should be:<br />
- <code>#(4 . "dot")</code></p>
<pre class="code">
define variable x = list (4, 5, 6)
tail (x) := #(9, 8, 7)
@@ -1496,7 +1492,12 @@
tail (x) := "dot"
<code> ⇒</code> "dot"
x
-<code> ⇒</code> #(4, 9, 8 . "dot")<a name="MARKER-2-1751"></a></pre>
+<code> ⇒</code> #(4 . "dot")<a name="MARKER-2-1751"></a></pre>
+ <p class="errata">
+ <a href="Errata#p309_1"
name="errata_p309_1"><strong>Errata:</strong></a> In the
+ published book, the final value of <code>x</code> is incorrect:
<code>#(4, 9, 8 .
+ "dot")</code>
+ </p>
</dd>
</dl>
<a name="HEADING102-253"></a>
@@ -2654,13 +2655,10 @@
of <var>target-sequence</var> are replaced by all the elements
of <var>insert-sequence</var>. The subsequence to be overridden
begins at
index <var>start</var> and ends at index <var>end</var>.</p>
- <p class="errata left"><a href="Errata#p325_1"
-
name="errata_p325_1"><strong>Errata:</strong></a>
- <var>source-sequence</var> should be <var>target-sequence</var>.</p>
<p><var>result-sequence</var> may or may not share structure
- with <var>source-sequence</var> or <var>insert-sequence</var>, and
it may or may not
- be <code>==</code> to <var>source-sequence</var>
- or <var>insert-sequence</var>. <var>source-sequence</var> may or
may not be modified by
+ with <var>target-sequence</var> or <var>insert-sequence</var>, and
it may or may not
+ be <code>==</code> to <var>target-sequence</var>
+ or <var>insert-sequence</var>. <var>target-sequence</var> may or
may not be modified by
the operation. <var>insert-sequence</var> will not be modified by
this operation.</p>
<pre class="code">
define variable *original* = list ("a", "b", "c", "d", "e")
@@ -2671,6 +2669,11 @@
*new* := replace-subsequence! (*new*, #("a", "b", "c"),
start: 2, end: 4))
#("x", "y", "a", "b", "c", "x", "y", "z")</pre>
+ <p class="errata">
+ <a href="Errata#p325_1"
name="errata_p325_1"><strong>Errata:</strong></a> In the
+ published book, <var>target-sequence</var> is incorrectly written
+ as <var>source-sequence</var>.
+ </p>
</dd>
</dl>
<a name="HEADING102-500"></a>
@@ -2886,15 +2889,16 @@
number of corresponding elements in the <var>collections</var>. If
all
the <var>collections</var> are sequences (including
<var>new-collection</var>),
processing is done in the natural order.</p>
- <p class="errata right"><a href="Errata#p329_1"
-
name="errata_p329_1"><strong>Errata:</strong></a>
- The result should be a vector:<br />
- <code>#[101, 102, 203, 204]</code></p>
<pre class="code">
map-as (<vector>, \+,
#(100, 100, 200, 200),
#(1, 2, 3, 4))
-<code> ⇒</code> #(101, 102, 203, 204)</pre>
+<code> ⇒</code> #[101, 102, 203, 204]</pre>
+ <p class="errata">
+ <a href="Errata#p329_1"
name="errata_p329_1"><strong>Errata:</strong></a> In the
+ published book, the result is incorrectly written as a list instead
of a
+ vector: <code>#(101, 102, 203, 204)</code>
+ </p>
</dd>
</dl>
<a name="HEADING102-544"></a>
Modified: trunk/www/books/drm/Constructing_and_Initializing_Instances.html
==============================================================================
--- trunk/www/books/drm/Constructing_and_Initializing_Instances.html
(original)
+++ trunk/www/books/drm/Constructing_and_Initializing_Instances.html Thu Dec
22 13:59:55 2005
@@ -503,12 +503,8 @@
<dt><var>below</var></dt>
<dd><p>An instance of <code><real></code>.</p></dd>
<dt><var>by</var></dt>
- <dd>
- <p class="errata right"><a href="Errata#p263_1"
-
name="errata_p263_1"><strong>Errata:</strong></a> The
- default value of <var>by</var> is <code>1</code>.</p>
- <p>An instance of <code><real></code>. The default value is
<code>0</code>.</p>
- </dd>
+ <dd><p>An instance of <code><real></code>. The default value
+ is <code>1</code>.</p></dd>
<dt><var>size</var></dt>
<dd><p>An instance of <code><real></code>.</p></dd>
</dl></dd>
@@ -525,6 +521,10 @@
<dd><p>Creates an instance of <code><range></code>. The arguments
correspond to the
initialization arguments of <code><range></code>, described
on <a href="Collection_Classes#MARKER-9-1454">page 230</a>.</p></dd>
+ <p class="errata">
+ <a href="Errata#p263_1"
name="errata_p263_1"><strong>Errata:</strong></a> In the published
+ book, an incorrect default value of <code>0</code> (zero) is given
for <var>by</var>.
+ </p>
</dl>
<a name="HEADING98-77"></a>
<h4 class="item-title"><span class="signature"><code
id="MARKER-2-1556">singleton</code> </span><span
class="attributes-summary">[Function]</span></h4>
Modified: trunk/www/books/drm/Define_Sealed_Domain.html
==============================================================================
--- trunk/www/books/drm/Define_Sealed_Domain.html (original)
+++ trunk/www/books/drm/Define_Sealed_Domain.html Thu Dec 22 13:59:55 2005
@@ -168,14 +168,10 @@
</li>
</ol>
<p>The third constraint is illustrated by the following example:</p>
- <p class="errata left">
- <a href="Errata#p136_1"
name="errata_p136_1"><strong>Errata:</strong></a>
- Missing <code>open</code> in generic and class definitions.
- </p>
<pre class="code">
-define generic m (x);
-define class <t> (<object>) end class <t>;
-define class <s> (<object>) end class <s>;
+define open generic m (x);
+define open class <t> (<object>) end class <t>;
+define open class <s> (<object>) end class <s>;
define method m (s :: <s>) end method m;
define sealed domain m (<t>);
@@ -187,6 +183,11 @@
of <code><c></code>, the method defined on <code>m</code> is not
within the domain
declared by the <code>define sealed domain</code>, but with the
definition
of <code><c></code> the method is within that domain.</p>
+ <p class="errata">
+ <a href="Errata#p136_1"
name="errata_p136_1"><strong>Errata:</strong></a> In the published
+ book, <code>open</code> is missing from the definitions of
<code>generic m</code>,
+ <code>class <t></code>, and <code>class <s></code>.
+ </p>
<a name="HEADING75-13"></a>
<a name="UID-Sealing-2154"></a>
<h2 class="subsection-title">Rationale</h2>
@@ -323,28 +324,21 @@
</ul>
<p>The following example illustrates why this condition is necessary.</p>
<p>Library <var>L<em><sub>1</sub></em></var> defines and exports the
following:</p>
- <p class="errata left">
- <a href="Errata#p140_1"
name="errata_p140_1"><strong>Errata:</strong></a>
- Missing <code>open</code> in generic and class definitions.
- </p>
<pre class="code">
-define generic g (x)
-define class <c1> (<object>) end class <c1>;
+define open generic g (x)
+define open class <c1> (<object>) end class <c1>;
</pre>
<p>Library <var>L<em><sub>2</sub></em></var> uses
<var>L<em><sub>1</sub></em></var> and
defines the following</p>
<pre class="code">
-define class <c2> (<c1>) end class <c2>;
+define open class <c2> (<c1>) end class <c2>;
define method g (x :: <c2>) end method;
define sealed domain g (<c2>)
</pre>
<p>Library <var>L<em><sub>3</sub></em></var> uses
<var>L<em><sub>1</sub></em></var> and
defines the following</p>
- <p class="errata left">
- <a href="Errata#p140_2"
name="errata_p140_2"><strong>Errata:</strong></a>
- <code><c></code> should be <code><c1></code>.</p>
<pre class="code">
-define method g (x :: <c>) end method;
+define method g (x :: <c1>) end method;
</pre>
<p>Libraries <var>L<em><sub>2</sub></em></var> and
<var>L<em><sub>3</sub></em></var> are
developed independently, and have no knowledge of each other. An
application that attempts
@@ -357,6 +351,16 @@
the compilation
of <var>L<em><sub>3</sub></em></var>.<a
name="MARKER-2-1138"></a><a name="MARKER-2-1139"></a></p>
+ <p class="errata">
+ <a href="Errata#p140_1"
name="errata_p140_1"><strong>Errata:</strong></a> In the published
+ book, <code>open</code> is missing from the definitions of
<code>generic g</code>, <code>class
+ <c1></code>, and <code>class <c2></code>.
+ </p>
+ <p class="errata">
+ <a href="Errata#p140_2"
name="errata_p140_2"><strong>Errata:</strong></a> In the published
+ book, <code>method g (x :: <c1>)</code> is incorrectly specialized
+ on <code><c></code>.
+ </p>
<a name="LINK-Sealing-lastpage"></a><a
name="LINK-MacrosTOC-firstpage"></a><a name="UID-MacrosTOC-714"></a>
<a name="LINK-MacrosTOC-lastpage"></a>
</div>
Modified: trunk/www/books/drm/Definition_Macros.html
==============================================================================
--- trunk/www/books/drm/Definition_Macros.html (original)
+++ trunk/www/books/drm/Definition_Macros.html Thu Dec 22 13:59:55 2005
@@ -370,19 +370,20 @@
<p>The use of the same name for a parameter and return value
indicates that the parameter
is returned as the value. This is only a convention; it is not
enforced by the
language.</p>
- <p class="errata left">
- <a href="Errata#p377_1"
name="errata_p377_1"><strong>Errata:</strong></a>
- <q><a href="Parameter_Lists#MARKER-2-813" title="Definition of
permit">permit</a></q>
- should be <q><a href="Parameter_Lists#MARKER-2-808"
title="Definition of
- recognize">recognize</a></q>.
- </p>
<p>The following example defines a generic function with one required
parameter and one
mandatory keyword parameter, <code>strength:</code>. Methods added
to the generic
function must have one required parameter, they must accept keyword
arguments, and they
- must permit the keyword argument <code>strength:</code>.</p>
+ must recognize the keyword argument <code>strength:</code>.</p>
<pre class="code">
define generic brew (brand :: <coffee-brand>, #key strength)
=> (coffee :: <coffee>) </pre>
+ <p class="errata">
+ <a href="Errata#p377_1"
name="errata_p377_1"><strong>Errata:</strong></a> In the
+ published book, the word
+ <q><a href="Parameter_Lists#MARKER-2-813" title="Definition of
permit">permit</a></q>
+ is incorrectly used instead of
+ <q><a href="Parameter_Lists#MARKER-2-808" title="Definition of
recognize">recognize</a></q>.
+ </p>
</dd>
</dl>
<a name="HEADING112-196"></a>
Modified: trunk/www/books/drm/Function_Application.html
==============================================================================
--- trunk/www/books/drm/Function_Application.html (original)
+++ trunk/www/books/drm/Function_Application.html Thu Dec 22 13:59:55 2005
@@ -178,15 +178,10 @@
of <var>argument</var> and <var>more-arguments</var> must be a
sequence. This sequence
is not passed as a single argument to <var>function</var>. Instead,
its elements are
taken individually as arguments to <var>function</var>.</p>
- <p class="errata right">
- <a href="Errata#p351_1"
name="errata_p351_1"><strong>Errata:</strong></a> Missing
- commas. Should be:<br />
- <code>apply(min, 5, 7, list(3, 1, 4))</code>
- </p>
<pre class="code">
apply(max, list(3, 1, 4, 1, 5, 9))
⇒ 9
-apply(min 5, 7 list(3, 1, 4))
+apply(min, 5, 7, list(3, 1, 4))
⇒ 1
define constant make-string =
method (#rest init-args) => string :: <string>;
@@ -194,6 +189,10 @@
end;
make-string(fill: 'a', size: 10)
⇒ "aaaaaaaaaa" </pre>
+ <p class="errata">
+ <a href="Errata#p351_1"
name="errata_p351_1"><strong>Errata:</strong></a> In the
+ published book, commas are missing: <code>apply(min 5, 7 list(3, 1,
4))</code>
+ </p>
</dd>
</dl>
Modified: trunk/www/books/drm/Functions_Overview.html
==============================================================================
--- trunk/www/books/drm/Functions_Overview.html (original)
+++ trunk/www/books/drm/Functions_Overview.html Thu Dec 22 13:59:55 2005
@@ -295,14 +295,10 @@
methods. The method that is returned is <dfn id="MARKER-2-779">closed
over</dfn>
the <code>score</code> parameter. Each time this method is called, it
updates
the <code>score</code> parameter and returns its new value.</p>
- <p class="errata left">
- <a href="Errata#p83_1" name="errata_p83_1"><strong>Errata:</strong></a>
- <code>points</code> should be named <code>score</code>.
- </p>
<pre class="code">
-define method make-score (points :: <number>)
+define method make-score (score :: <number>)
method (increase :: <number>)
- points := points + increase;
+ score := score + increase;
end method;
end method make-score;
@@ -325,6 +321,11 @@
each closure returned by <code>make-score</code> refers to a different
binding. In this way,
assignments to the variable made by one closure do not affect the value
of the variable
visible to other closures.</p>
+ <p class="errata">
+ <a href="Errata#p83_1" name="errata_p83_1"><strong>Errata:</strong></a>
In the published
+ book, the <code>score</code> parameter is incorrectly written as
<code>points</code>
+ in <code>method make-score</code>.
+ </p>
<p>The following example defines a method for <code>double</code> that
works on
functions. When you double a function, you get back a method that
accepts arguments and
calls the function twice, passing the same arguments both times. The
method that is returned
@@ -347,7 +348,7 @@
score-david(0)
⇒ 140<a name="MARKER-2-780"></a><a name="MARKER-2-781"></a>
</pre>
-
+
</div>
<div id="footer">
Modified: trunk/www/books/drm/Limited_Types.html
==============================================================================
--- trunk/www/books/drm/Limited_Types.html (original)
+++ trunk/www/books/drm/Limited_Types.html Thu Dec 22 13:59:55 2005
@@ -130,16 +130,16 @@
<a name="HEADING46-0"></a>
<a name="UID-Types_and_Classes-1560"></a>
<h1 class="section-title"><a name="MARKER-2-706"></a><a
name="MARKER-9-707"></a>Limited Types</h1>
- <p class="errata left">
- <a href="Errata#p73_2" name="errata_p73_2"><strong>Errata:</strong></a>
Missing comma
- between <code>0</code> and <code>max:</code>.
- </p>
<p>Limited types are subtypes of classes constrained by additional
criteria. Limited types are
- created with the function <code>limited</code>.
<code>limited(<integer> ,min: 0 max:
- 255)</code> and <code>limited(<array>, of:
<single-float>)</code> are examples of
- limited types that are useful both for error checking and for
optimization of compiled
+ created with the function <code>limited</code>.
<code>limited(<integer>, min: 0, max:
+ 255)</code> and <code>limited(<array>, of:
<single-float>)</code> are examples
+ of limited types that are useful both for error checking and for
optimization of compiled
code.</p>
<p>Limited types are not classes.</p>
+ <p class="errata">
+ <a href="Errata#p73_2" name="errata_p73_2"><strong>Errata:</strong></a>
In the published
+ book, a comma is missing between <code>0</code> and <code>max:</code>.
+ </p>
<a name="HEADING46-3"></a>
<a name="UID-Types_and_Classes-3852"></a>
<h2 class="subsection-title">Limited Type Constructor</h2>
Modified: trunk/www/books/drm/Parameter_Lists.html
==============================================================================
--- trunk/www/books/drm/Parameter_Lists.html (original)
+++ trunk/www/books/drm/Parameter_Lists.html Thu Dec 22 13:59:55 2005
@@ -454,17 +454,16 @@
type <code><number></code>. It declares a return value of
type <code><object></code>. To specify a type, both the name and
the type must be
specified. If only one is given, it is taken as the name.</p>
- <p class="errata left">
- <a href="Errata#p93_1" name="errata_p93_1"><strong>Errata:</strong></a>
The return value
- declaration should be:<br />
- <code>=> <number>;</code>
- </p>
<pre class="code">
define method average (x :: <number>, y :: <number>)
- => avg :: <number>;
+ => <number>;
truncate/((x + y), 2);
end method;
</pre>
+ <p class="errata">
+ <a href="Errata#p93_1" name="errata_p93_1"><strong>Errata:</strong></a>
In the published
+ book, the return value declaration is incorrect: <code>=> avg ::
<number>;</code>
+ </p>
<a name="HEADING49-84"></a>
<a name="UID-Functions-2334"></a>
<h2 class="subsection-title"><a name="MARKER-9-837"></a>Parameter List
Congruency</h2>
Modified: trunk/www/books/drm/Reflective_Operations_on_Functions.html
==============================================================================
--- trunk/www/books/drm/Reflective_Operations_on_Functions.html (original)
+++ trunk/www/books/drm/Reflective_Operations_on_Functions.html Thu Dec 22
13:59:55 2005
@@ -355,14 +355,9 @@
<dt><var>rest-boolean</var></dt>
<dd><p>An instance of <code><boolean></code>.</p></dd>
<dt><var>kwd-sequence</var></dt>
- <dd>
- <p class="errata right">
- <a href="Errata#p354_1"
name="errata_p354_1"><strong>Errata:</strong></a>
- <code><keyword></code> should be
<code><symbol></code>.
- </p>
- <p>Either <code>#f</code> or the symbol <code>#"all"</code> or an
instance
+ <dd><p>Either <code>#f</code> or the symbol <code>#"all"</code> or
an instance
of <code><collection></code> whose elements are instances
- of <code><keyword></code>.</p>
+ of <code><symbol></code>.</p>
</dd>
</dl></dd>
<dt><span>Description:</span></dt>
@@ -384,6 +379,11 @@
their being recognized by applicable methods.</p>
</dd>
</dl>
+ <p class="errata">
+ <a href="Errata#p354_1"
name="errata_p354_1"><strong>Errata:</strong></a> In the published
+ book, <code><symbol></code> is incorrectly written as
+ <code><keyword></code> in the description of
<var>kwd-sequence</var>.
+ </p>
<a name="HEADING106-49"></a>
<h4 class="item-title"><span class="signature"><code
id="MARKER-2-1904">function-return-values</code> </span><span
class="attributes-summary">[Function]</span></h4>
<hr class="item-title" />
Modified: trunk/www/books/drm/Statement_Macros.html
==============================================================================
--- trunk/www/books/drm/Statement_Macros.html (original)
+++ trunk/www/books/drm/Statement_Macros.html Thu Dec 22 13:59:55 2005
@@ -797,20 +797,21 @@
<p>The exception clauses are checked in the order in which they
appear. That is, the first
handler will take precedence over the second, the second over the
third, etc.</p>
<p>The following is a trivial use of an exception clause.</p>
- <p class="errata right">
- <a href="Errata#p406_1"
name="errata_p406_1"><strong>Errata:</strong></a> In this
- example, the <code>cleanup</code> and <code>exception</code>
clauses are incorrectly
- ordered. <code>cleanup</code> must come before
<code>exception</code> clauses.
- </p>
<pre class="code">
block ()
open-files();
compute-with-files()
-exception (<error>)
- "didn't work";
cleanup
close-files();
+exception (<error>)
+ "didn't work";
end block </pre>
+ <p class="errata">
+ <a href="Errata#p406_1"
name="errata_p406_1"><strong>Errata:</strong></a> In the
+ published book, the <code>cleanup</code> and <code>exception</code>
clauses are
+ incorrectly ordered. <code>cleanup</code> must come before
<code>exception</code>
+ clauses.
+ </p>
<a name="HEADING114-310"></a>
<h5 class="description-subsection-title">Dynamic Extent of Block
Features</h5>
<p>A block installs features that are active for different portions
of the execution of
Modified: trunk/www/books/drm/Title.html
==============================================================================
--- trunk/www/books/drm/Title.html (original)
+++ trunk/www/books/drm/Title.html Thu Dec 22 13:59:55 2005
@@ -121,8 +121,7 @@
<p class="contributor">With contributions by David Moon and Orca
Starbuck</p>
<p class="Modelsw/Sub">[This HTML version corresponds to the book
published by Addison-Wesley
- in 1996, including most of the known errors. See the <a
href="Errata">errata</a> page for
- details.]</p>
+ in 1996, with corrections. See the <a href="Errata">errata</a> page for
details.]</p>
</div>
<div id="footer">
Modified: trunk/www/books/drm/Union_Types.html
==============================================================================
--- trunk/www/books/drm/Union_Types.html (original)
+++ trunk/www/books/drm/Union_Types.html Thu Dec 22 13:59:55 2005
@@ -185,16 +185,16 @@
<code>subtype?(<var>s<em><sub>1</sub></em></var>, <var>t</var>)</code>
is true for
some <var>t</var> in
<var>t<em><sub>1</sub></em></var>…<var>t<em><sub>n</sub></em></var>.</p>
- <p class="errata left">
- <a href="Errata#p73_1" name="errata_p73_1"><strong>Errata:</strong></a>
Missing comma
- between the arguments to <code>subtype?</code>.
- </p>
-
<p><code>subtype?(type-union*(<var>s<em><sub>1</sub></em></var>…<var>s<em><sub>m</sub></em></var>)
+
<p><code>subtype?(type-union*(<var>s<em><sub>1</sub></em></var>…<var>s<em><sub>m</sub></em></var>),
type-union*(<var>t<em><sub>1</sub></em></var>…<var>t<em><sub>n</sub></em></var>))</code>
will be true if and only if every <var>s</var>
in
<var>s<em><sub>1</sub></em></var>…<var>s<em><sub>m</sub></em></var> is a
subtype
of some <var>t</var> in
<var>t<em><sub>1</sub></em></var>…<var>t<em><sub>n</sub></em></var>.<a
name="MARKER-2-705"></a></p>
+ <p class="errata">
+ <a href="Errata#p73_1" name="errata_p73_1"><strong>Errata:</strong></a>
In the published
+ book, the comma between the arguments to <code>subtype?</code> is
missing.
+ </p>
</div>
--
Gd-chatter mailing list
Gd-chatter@xxxxxxxxxxxxxxxx
https://gauss.gwydiondylan.org/mailman/listinfo/gd-chatter
|