- Unsigned Byte

From: CFB Software <"CFB>
Date: Wed, 8 Aug 2007 21:53:20 +0930

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

> -----Original Message-----
> From: blackbox{([at]})nowhere.xy
> Sent: Saturday, 14 July 2007 2:27 PM
> To: BlackBox Mailing List
> Subject: [BlackBox] - Unsigned Byte
>
>
> How does one import a function or procedure from a DLL into
> Blackbox that
> contains an unsigned byte?
>
> p.s. I see that Gardens Point has a UBYTE type
>

One way would be to define your own UBYTE type in Blackbox along with a
couple of conversion functions. Something like this:

TYPE
   UBYTE = SHORTCHAR;

PROCEDURE IntToUBYTE(i: INTEGER): UBYTE;
BEGIN
  RETURN SHORT(CHR(i))
END IntToUBYTE;

PROCEDURE UBYTEToInt(u: UBYTE): INTEGER;
BEGIN
  RETURN ORD(u)
END UBYTEToInt;

Regards,
Chris Burrows
CFB Software
http://www.cfbsoftware.com/gpcp

--- BlackBox
--- send subject HELP or UNSUBSCRIBE to blackbox{([at]})nowhere.xy

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

e1xydGYxXGFuc2lcYW5zaWNwZzEyNTJcZnJvbXRleHQgXGRlZmYwe1xmb250dGJsDQp7XGYwXGZz
d2lzcyBBcmlhbDt9DQp7XGYxXGZtb2Rlcm4gQ291cmllciBOZXc7fQ0Ke1xmMlxmbmlsXGZjaGFy
c2V0MiBTeW1ib2w7fQ0Ke1xmM1xmbW9kZXJuXGZjaGFyc2V0MCBDb3VyaWVyIE5ldzt9fQ0Ke1xj
b2xvcnRibFxyZWQwXGdyZWVuMFxibHVlMDtccmVkMFxncmVlbjBcYmx1ZTI1NTt9DQpcdWMxXHBh
cmRccGxhaW5cZGVmdGFiMzYwIFxmMFxmczIwID4gLS0tLS1PcmlnaW5hbCBNZXNzYWdlLS0tLS1c
cGFyDQo+IEZyb206IGJsYWNrYm94QG9iZXJvbi5jaCBbbWFpbHRvOmJsYWNr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kNGQiBT
b2Z0d2FyZVxwYXINCmh0dHA6Ly93d3cuY2Zic29mdHdhcmUuY29tL2dwY3BccGFyDQpccGFyDQot
LS0gQmxhY2tCb3hccGFyDQotLS0gc2VuZCBzdWJqZWN0IEhFTFAgb3IgVU5TVUJTQ1JJQkUgdG8g
YmxhY2tib3hAb2Jlcm9uLmNofX0AYVjQfg==


----boundary-LibPST-iamunique-224808779_-_---
Received on Wed Aug 08 2007 - 14:23:20 UTC

This archive was generated by hypermail 2.3.0 : Thu Sep 26 2013 - 06:31:26 UTC