[Coco] Drivewire mixed results...

Boisy Pitre boisy at tee-boy.com
Thu Sep 25 08:56:31 EDT 2008


On Sep 25, 2008, at 7:52 AM, Chuck Youse wrote:

> 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.

I don't see right off-hand how that might be, but I'm open to  
suggestions.  Feel free to provide an improved function and I'll  
certainly incorporate it into the next rev of the specification  
document.

>
> C.
>
>
>
> --
> Coco mailing list
> Coco at maltedmedia.com
> http://five.pairlist.net/mailman/listinfo/coco

Regards,
Boisy G. Pitre
--
Tee-Boy
Email: boisy at tee-boy.com
Web: http://www.tee-boy.com




More information about the Coco mailing list