Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
02/13/08 11:22
Read: times


 
#150717 - That's because it's wrong!
Responding to: ???'s previous message
Koosha Khannakhjavani said:
No it doesn't compile at least in Codevision, I don't know if it is valid in other compilers?

No, it isn't.

one mistake in the previous code is an redundant "r" in line 2 of while block!

When posting code, never manually retype it - for exactly this reason!

it's part of the article " A PAINLESS GUIDE TO CRC ERROR DETECTION ALGORITHMS" at the end of chapter10
http://www.repairfaq.org/filipg/LI...c_v33.html

You're right - he consistently makes this mistake!

As Christoph says, there must be something missing:
http://www.8052.com/forumchat/read.phtml?id=150715

I guess there should be a pointer to the byte being used in the computation, and this is being post-incremented ready for the next byte; eg.
r = (r << 8) | *pointer++;

There is a 'Feedback' button on the page - have you tried using it?

List of 15 messages in thread
TopicAuthorDate
C programming question            01/01/70 00:00      
   How to post source code            01/01/70 00:00      
      doesn't compile!/reference            01/01/70 00:00      
         That's because it's wrong!            01/01/70 00:00      
            feedback            01/01/70 00:00      
               Very Good .            01/01/70 00:00      
                  what are you talking about Ap?            01/01/70 00:00      
                     What I mean is            01/01/70 00:00      
                        Unfair?            01/01/70 00:00      
                            Unfair ? what I didnt got you ?            01/01/70 00:00      
   I would guess ...            01/01/70 00:00      
      Is this a typo            01/01/70 00:00      
         Yes, it's a typo!            01/01/70 00:00      
            Is this site chinese :))            01/01/70 00:00      
   Thank you,Andy,Christoph            01/01/70 00:00      

Back to Subject List