xHarbour Reference Documentation > Function Reference xHarbour Developers Network  

HB_BitAnd()

Performs a bitwise AND operation with numeric integer values.

Syntax

HB_BitAnd( <nInteger1>, <nInteger2> ) --> nResult

Arguments

<nInteger>
Two numeric integer values must be passed. If numbers with decimal fractions or values of other data types are specified, a runtime error is generated. Function Int() can be used to make sure both parameters are integer values.

Return

The function returns a numeric value. It is the result of the bitwise AND operation with both parameters.

Description

The function performs bitwise AND operation with two integer values. It compares individual bits of both values at the same position. If bits at the same position are set in both values, the bit at this position is also set in the return value.

Info

See also:& (bitwise AND), HB_BitIsSet(), HB_BitNot(), HB_BitOr(), HB_BitXOr()
Category: Bitwise functions , xHarbour extensions
Source:rtl\hbBitf.c
LIB:xhb.lib
DLL:xhbdll.dll


Copyright © 2006-2007 xHarbour.com Inc. All rights reserved.
http://www.xHarbour.com
Created by docmaker.exe