Per Bothner <per_at_bothner.com> writes:
> But another anbiguity is whether bytes are signed or unsigned. As a
> measure of storage size (the most common one) it doesn't matter, but as
> a data type it does. Notice that "byte" in both Java and C\# is signed.
> (C# also has "unsigned byte".)
You are right about Java, but in C# byte is unsigned, sbyte is signed.
IMHO unsigned bytes are more practical and should be enough for
everybody (it's trivial to convert them when needed), although
if a function accepts a byte as an argument, there is no harm
in accepting -128..-1 too.
As for "byte" vs. "octet", I feel that almost everyone calls them
bytes in practice, except things like Internet standards, and that
today each byte has 8 bits.
--
__("< Marcin Kowalczyk
\__/ qrczak_at_knm.org.pl
^^ http://qrnik.knm.org.pl/~qrczak/
Received on Mon Nov 20 2006 - 15:12:23 UTC