Re: Unsigned integer math exists!

From: [at]} <René>
Date: Thu, 20 Nov 2003 14:42:54 -0400

----boundary-LibPST-iamunique-220187521_-_-
Content-type: text/plain

In trying to concatenate two eight bits unsigned values (msb, lsb),
ASH (ORD (msb), 8) + ORD (lsb), where msb, lsb are SHORTCHAR generates 8
bytes of code less than
SHORT(msb * 256 + lsb MOD 256), where msb, lsb are BYTE.
Both work fine, but both are tricky.

I wonder why BYTE was not defined as 0..255, instead of -128..+127?
Those signs are an annoyance when acquiring serial port BYTEs.

Cheers,
Ren Dorta.





--------------------------------------------

To unsubscribe from this mailing list, send a message containing the word "unsubscribe" to:
   blackbox-request{([at]})nowhere.xy

To get a list of valid e-mail commands and instructions on their usage, send a message containing the word "help" to the above address.

Send any problem reports or questions related to this email list to the list owner at
   owner-blackbox{([at]})nowhere.xy

Current posting policy:

a) To post you should use the same address by which you are subscribed to the mailing list. That way, the list server will recognize you as subscriber and forward your posting immediately, without creating any overhead.

b) If, for some reason, you cannot post from the address, by which you are subscribed, your message will be moderated to avoid spam. Please understand that moderation will often cause some delay, in particular over weekends or holydays.



----boundary-LibPST-iamunique-220187521_-_-
Content-type: application/rtf
Content-transfer-encoding: base64
Content-Disposition: attachment; filename="rtf-body.rtf"

e1xydGYxXGFuc2lcYW5zaWNwZzEyNTJcZnJvbXRleHQgXGRlZmYwe1xmb250dGJsDQp7XGYwXGZz
d2lzc1xmY2hhcnNldDAgQXJpYWw7fQ0Ke1xmMVxmbW9kZXJuIENvdXJpZXIgTmV3O30NCntcZjJc
Zm5pbFxmY2hhcnNldDIgU3ltYm9sO30NCntcZjNcZm1vZGVyblxmY2hhcnNldDAgQ291cmllciBO
ZXc7fX0NCntcY29sb3J0YmxccmVkMFxncmVlbjBcYmx1ZTA7XHJlZDBcZ3JlZW4wXGJsdWUyNTU7
fQ0KXHVjMVxwYXJkXHBsYWluXGRlZnRhYjM2MCBcZjBcZnMyMCBJbiB0cnlpbmcgdG8gY29uY2F0
ZW5hdGUgdHdvIGVpZ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