Unsigned in Component Pascal
----boundary-LibPST-iamunique-41764775_-_-
Content-type: text/plain
Hi:
this must be a FAQ, but let me ask. How can I treat
a CP varaiable as an unsigned number, such that I can
easily converse with C libraries?
Specifically, the following does not compile with a message
"number too large", even though it would fit as an unsigned
bit pattern in the BYTE variable.
Any idea how to make it compile without violating the "CP spirit"
in some major way?
MODULE TestTest;
PROCEDURE TEST;
VAR test:BYTE;
BEGIN
test := 0ABH (*number too large*)
END TEST;
END TestTest.
As a side remark, lack of unsigned numerics in CP looks
like a major pain to me. I did not realize this until started
interfacing CP to Windows DLL's.
Wojtek Skulski skulski{([at]})nowhere.xy
--------------------------------------------
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-41764775_-_-
Content-type: application/rtf
Content-transfer-encoding: base64
Content-Disposition: attachment; filename="rtf-body.rtf"
e1xydGYxXGFuc2lcYW5zaWNwZzEyNTJcZnJvbXRleHQgXGRlZmYwe1xmb250dGJsDQp7XGYwXGZz
d2lzcyBBcmlhbDt9DQp7XGYxXGZtb2Rlcm4gQ291cmllciBOZXc7fQ0Ke1xmMlxmbmlsXGZjaGFy
c2V0MiBTeW1ib2w7fQ0Ke1xmM1xmbW9kZXJuXGZjaGFyc2V0MCBDb3VyaWVyIE5ldzt9fQ0Ke1xj
b2xvcnRibFxyZWQwXGdyZWVuMFxibHVlMDtccmVkMFxncmVlbjBcYmx1ZTI1NTt9DQpcdWMxXHBh
cmRccGxhaW5cZGVmdGFiMzYwIFxmMFxmczIwIFxwYXIN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