[Coco] Drivewire mixed results...
    Chuck Youse 
    cyouse at serialtechnologies.com
       
    Thu Sep 25 08:52:12 EDT 2008
    
    
  
On Thu, 2008-09-25 at 07:38 -0500, Boisy Pitre wrote:
> Your post is ambiguous.  In what way is the code ambiguous?
> >
> > int calChecksum(char *ptr, int count)
> > {
> >     short Checksum = 0;
> >     while(--count)
> >     {
> >          Checksum += *(ptr++);
> >     }
> >     return (Checksum);
> > }
> >
> >
Sorry, by saying the code is 'ambiguous' I meant that it can be
interpreted by different compilers to mean different things, resulting
in different values of 'Checksum' for the same block of data.
C.
    
    
More information about the Coco
mailing list