Re: byte data type



On Sun, 14 Aug 2005 20:29:05 +0100, Thomas Hawtin
<usenet@xxxxxxxxxxxxxxxxx> wrote or quoted :

>C does not specify the number of bits to a char. Nor if it is signed or
>unsigned (usually they are unsigned). It doesn't even specify if signed
>chars use two-complement notation.

Yes they had chaos. When people used only 7-bit ASCII it did not
matter, and the signed was a nice feature to use for short offsets.

Back then you had compiler options to consider byte as signed or
unsigned, but tradition left it signed.

Java went with the signed tradition even though nowadays 99% of the
time you want unsigned. Perhaps sun hardware is signed byte only.

I know Intel circa 386 used be unusually slow at handling signed
bytes.

.



Relevant Pages

  • Re: Comments on my code?
    ... I am learning C from some old lecture notes, ... char *strtrim ... in the declaration as well as the definition. ... and you should specify the return type, ...
    (comp.lang.c)
  • Re: function
    ... value to main function .but sometimes we specify within main ... int main(int argc, char *argv) { ...
    (comp.programming)
  • Re: Passing address of multidimentional array
    ... main(int argc, char** argv) ... You have to specify all but the leftmost dimension in the function ...
    (microsoft.public.vc.language)
  • Re: Keil uVision 2. Time & Date in Filename
    ... I know it depends on compiler but I ... First char may be either signed or unsigned depending on the ... you are using it as a small integer type rather than a character. ... I always use a typedef header and specify all my ...
    (comp.arch.embedded)