xHarbour Reference Documentation > Function Reference xHarbour Developers Network  

HB_BitOr()

Performs a bitwise OR operation with numeric integer values.

Syntax

HB_BitOr( <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 OR operation with both parameters.

Description

The function performs bitwise OR 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 either value, the bit at this position is also set in the return value. The bit in the return value is not set when the bits of both values at this position are not set.

Info

See also:| (bitwise OR), HB_BitAnd(), HB_BitIsSet(), HB_BitNot(), 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