Author: cpage
Date: Thu Nov 17 21:23:20 2005
New Revision: 10368
Modified:
trunk/www/books/drm/drm_49.html
trunk/www/books/drm/drm_errata.html
Log:
Job: website
Added an erratum about the incorrect return value declaration for method
average() on page 93, Chapter 6, Functions, Return Value Declarations.
Modified: trunk/www/books/drm/drm_49.html
==============================================================================
--- trunk/www/books/drm/drm_49.html (original)
+++ trunk/www/books/drm/drm_49.html Thu Nov 17 21:23:20 2005
@@ -286,7 +286,9 @@
end case
end method family;
</pre>
-<p class="T1.Text1">Note that the following example does not declare a return
value of 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.<code></code></p>
+<p class="T1.Text1">Note that the following example does not declare a return
value of 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"><em>Errata:</em> The return value declaration should
be:<br />
+<code>=> <number>;</code></p>
<pre class="Cv.Code">
define method average (x :: <number>, y :: <number>)
=> avg :: <number>;
Modified: trunk/www/books/drm/drm_errata.html
==============================================================================
--- trunk/www/books/drm/drm_errata.html (original)
+++ trunk/www/books/drm/drm_errata.html Thu Nov 17 21:23:20 2005
@@ -68,6 +68,25 @@
<li>p. 83, "Closures". The second paragraph in this section talks
about the <tt>score</tt> parameter, while the code actually uses a
parameter called <tt>points</tt>.</li>
+
+ <li>p. 93, in the second definition of method <tt>average</tt>, the
+ return value declaration is incorrect; it contains both a binding name
+ and a type
+
+ <ul>
+ <li><tt> => avg :: <number>;</tt></li>
+ </ul>
+
+ <p>but the example is meant to illustrate how, if you do not provide
+ both, the first word is parsed as the binding name even if it appears
+ to be the name of a type. The return value declaration should
+ read</p>
+
+ <ul>
+ <li><tt> => <number>;</tt></li>
+ </ul>
+
+ </li>
<li>p. 136, the illustration of the third constraint implied by
<tt>define sealed domain</tt> should include open declarations for
--
Gd-chatter mailing list
Gd-chatter@xxxxxxxxxxxxxxxx
https://gauss.gwydiondylan.org/mailman/listinfo/gd-chatter
|