11.04.2013 Views

UniBasic Commands Reference - Rocket Software

UniBasic Commands Reference - Rocket Software

UniBasic Commands Reference - Rocket Software

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

BITAND<br />

Syntax<br />

BITAND(num.expr1,num.expr2)<br />

Description<br />

The <strong>UniBasic</strong> BITAND function performs the bit-wise AND logical function on the<br />

arguments num.expr1 and num.expr2.<br />

With null value handling on, the result of any mathematical operation, function, or<br />

comparison involving the null value is the null value. BITAND returns the null value<br />

when num.expr1 or num.expr2 is the null value.<br />

The following table shows the results of the BITAND function on various sets of<br />

input.<br />

Example<br />

In the following example, the program statement prints a 0:<br />

PRINT BITAND(0,1)<br />

1-107 <strong>UniBasic</strong> <strong>Commands</strong> <strong>Reference</strong><br />

num.expr1<br />

num.expr<br />

2 Result<br />

0 0 0<br />

0 1 0<br />

1 0 0<br />

1 1 1<br />

3 9 1<br />

23 87 23<br />

BITAND Function Operation Results

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!