Testing Values

<< Click to Display Table of Contents >>

Navigation:  ETEC 'C' Compiler Information >

Testing Values

Previous pageReturn to chapter overviewNext page

The Byte Craft compiler (version 990 for example) generally implements the !=0 slightly more efficiently than ==1.

Try to use:

if (x!=0)

    z = a + b;

rather than:

if (x==1)

    z = a + b;

The ETEC compiler generally will generate code of the same efficiency for both versions, but there may be some cases where the former code snippet allows slightly better opcode packing, so it is still recommended it be used if possible.