??? 02/09/07 18:15 Read: times |
#132391 - minor problem Responding to: ???'s previous message |
Charles Bannister said:
Hello Andy,
The only difference between your code and my code is mine is tested and is known to work. Your code is impossible to work. THERE ARE ERRORS WITHING THE CODE! My suggestion is to take the time and do the job right and test your code. Also would suggest write your example to be 100% compatible to mine and stop cutting corners. Also QBasic runs without compiling whereas c requires more preparation. Regards, Charles Bannister can you agree on this one then... void main( void ) { unsigned char checksum; int x; char nema_string[] = "$GPRMC,000004,V,3714.6284,N,12146.9181,W,0.000,0.0,290697,15.4,E*4C"; printf( " %s\n", nema_string ); checksum = 0; for( x = 1; x < strlen(nema_string)-3; ++x ) { checksum ^= nema_string[x]; } printf( " NEMA Checksum is %02X\n", checksum ); } |