logo       
Google Custom Search
    AddThis Social Bookmark Button
-->

r10368 - trunk/www/books/drm: msg#00081

Subject: r10368 - trunk/www/books/drm
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>&lt;number&gt;</code>. It declares a return value of type 
<code>&lt;object&gt;</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>&lt;number&gt;</code>. It declares a return value of type 
<code>&lt;object&gt;</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>=&gt; &lt;number&gt;;</code></p>
 <pre class="Cv.Code">
 define method average (x :: &lt;number&gt;, y :: &lt;number&gt;)
  =&gt; avg :: &lt;number&gt;;

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 :: &lt;number&gt;;</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> => &lt;number&gt;;</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



<Prev in Thread] Current Thread [Next in Thread>