Text or Number
Scott Penrose
scottp at dd.com.au
Sun Mar 28 18:12:37 CST 2004
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 28/03/2004, at 9:13 PM, Joshua Goodall wrote:
> Scott is writing parallel port driver, and some API users confuse
> ascii '1' (binary 0001111) with the actual value 00000001. This can
> result in more parallel lines being set than expected :). By detecting
> that the API user actually used a literal 1, you can implement a
> DWIM handler internally e.g. using pack().
This give me an idea...
->set_byte(0, 12);
->set_byte(0, chr(12));
->set_byte(0, [0,0,0,0,1,1,0,0]);
should probably all work. That way if someone already has a bit array,
they can give that to me :-)
Scott
- --
Scott Penrose
Open source developer
http://linux.dd.com.au/
scottp at dd.com.au
Dismaimer: Open sauce usually ends up never coming out (of the bottle).
Please do not send me Word or PowerPoint attachments.
See http://www.fsf.org/philosophy/no-word-attachments.html
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (Darwin)
iD8DBQFAZ2n4DCFCcmAm26YRAuqsAJ9KFQPFzmHksAQ3L+G7lR3ijDgTxQCffJRV
eDCmmRstv23p9Lp0TYy/WU0=
=WWED
-----END PGP SIGNATURE-----
More information about the Melbourne-pm
mailing list