<br><br><div class="gmail_quote">---------- Forwarded message ----------<br>From: <b class="gmail_sendername">Alejandro Alcalde</b> <span dir="ltr"><<a href="mailto:algui91@gmail.com">algui91@gmail.com</a>></span><br>
Date: 2010/9/28<br>Subject: Errata en ejemplo 19.2<br>To: Lista de correo sobre C y C++ <<a href="mailto:cconclase@listas.conclase.net">cconclase@listas.conclase.net</a>><br><br><br>Hola, creo que en este ejemplo, falta la llave inicial de la funcion:<br>
<pre>WORD CalcCRC(WORD uCRC, BYTE bData)    <span>int</span> i;<br>   BYTE bD = bData;<br>   <span>for</span>(i = 0; i < 8; i++) {<br>
        uCRC <<= 1;<br>        <span>if</span>(bD & 0x0080) uCRC ^= CCITT_POLYNOM;<br>        bD <<= 1;<br>   }<br>   <span>return</span> uCRC;<br>}<br><br>Seria asi:<br><br>WORD CalcCRC(WORD uCRC, BYTE bData){<br>

<span>   int</span> i;<br>   BYTE bD = bData;<br>   <span>for</span>(i = 0; i < 8; i++) {<br>        uCRC <<= 1;<br>        <span>if</span>(bD & 0x0080) uCRC ^= CCITT_POLYNOM;<br>
        bD <<= 1;<br>   }<br>   <span>return</span> uCRC;<br>}<br></pre><font color="#888888"><br clear="all"><br>-- <br><b style="font-family: courier new,monospace; color: rgb(51, 102, 255);"><i>Saludos, Alejandro A.B.<br>
Blog: <a href="http://bashyc.blogspot.com/" target="_blank">http://bashyc.blogspot.com/</a></i></b><br>
<font style="font-family: courier new,monospace;" color="#3366ff"><i><b>Twitter: <a href="http://twitter.com/algui91" target="_blank">http://twitter.com/algui91</a></b></i></font><br><br>
</font></div><br><br clear="all"><br>-- <br><b style="font-family: courier new,monospace; color: rgb(51, 102, 255);"><i>Saludos, Alejandro A.B.<br>Blog: <a href="http://bashyc.blogspot.com/" target="_blank">http://bashyc.blogspot.com/</a></i></b><br>
<font style="font-family: courier new,monospace;" color="#3366ff"><i><b>Twitter: <a href="http://twitter.com/algui91" target="_blank">http://twitter.com/algui91</a></b></i></font><br><br>