On 04-Jul-97, Vadim Davydoff wrote to Javier Kohen about Classes
[1/2].
JK>> switch (regs.x.bx) {
JK>> case 0x0000:
JK>> setButtons(0);
JK>> break;
JK>> case 0x0002:
JK>> setButtons(2);
JK>> break;
JK>> case 0x0003:
JK>> setButtons(3);
JK>> break;
JK>> case 0xFFFF:
JK>> setButtons(2);
JK>> break;
JK>> default:
JK>> setButtons(regs.x.bx);
JK>> }
VD> As I see, the only following string replaces this switch:
VD> setButtons (regs.x.bx == 0xffff ? 2 : regs.x.bx);
You're right, but in the oneliner I have the need to comment, in the
swicth is self-documented. A few bytes won't hurt anybody, and this
function is non-speed critical.
Javier Kohen [The_Crusher] http://jkohen.base.org
... Cuando ya se te va la vida, entr s a un sanatorio con cara de morirte,
sangra tu nariz y tu boca, provoca mucho asco. Cancer!!! þ Flema
-!- CrusherTag 0.3.2.
--- Terminate 4.00/Pro
4:900/748.3)
---------------
* Origin: The King of The Ring BBS þ +54-1-OFF-LINE þ TLD 0 - 7
|