xHarbour Reference Documentation > Function Reference xHarbour Developers Network  

HB_BitXOr()

Performs a bitwise XOR operation with numeric integer values.

Syntax

HB_BitXOr( <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 XOR operation with both parameters.

Description

The function performs bitwise XOR operation with two integer values. It compares individual bits of both values at the same position. The bit at the same position is set in the return value, when both integer values have the bit set differently at the same position. If both integers have the same bit set or not set, i.e. when both bits are the same, the corresponding bit in the return value is not set.

Info

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