On Wed, 28 Apr 2004, Peter Dalgaard wrote:
>
> Looks like a classic signed/unsigned confusion. Negative numbers
> stored in ones-complement format in single bytes, but getting
> interpreted as unsigned. A bug report could be a good idea if the
> resident Stata expert (Thomas, I believe) is unavailable just now.
>

Yes, it's a simple signed/unsigned bug. We carefully read in the 2-byte
and 4-byte types as unsigned int so we can use << and >> to do byte
swapping, but of course this doesn't work for the 1-byte type.  There's
the additional problem that sometimes we want to read an unsigned byte of
meta-data.

        -thomas

______________________________________________
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

Reply via email to