| Liste des Groupes | Revenir à cl c |
On 21.03.2025 00:10, Keith Thompson wrote:bart <bc@freeuk.com> writes:>[...]
Look at this one for example:
>
typedef uint8_t byte; // from arduino.h
>
I can only one of reason this exists, which is that 'byte' is a far
nicer denotation.
I agree in this case. "byte" documents what the type is intended for.
I disagree on both above expressed opinions in more than one way.
>
Byte is a bad term to denote a quantity or an intention. Formerly
a "Byte" was used to carry characters; its size could be anything
from 5 to 9 bit. There was a reason why in international standards
documents there's the 'octet' introduced to unambiguously hint to
an 8-bit quantity. Neither is it good, as we see in practice, to
assume a 'byte' (whatever it actually is) to be able to carry a
character, not even 'char' or 'unsigned char' seem to be able to
accomplish that given the "wide character" types in the context of
Unicode (16 bit, 32 bit) characters and (variable-length) UTF-8
encodings.
typedef uint8_t byte; // from arduino.h
Les messages affichés proviennent d'usenet.