xHarbour Reference Documentation > Function Reference xHarbour Developers Network  

IsBit()

Checks whether a bit at a specified position is set.

Syntax

IsBit( <nInteger>|<cHex>, [<nBitPos>]) --> lBitIsSet

Arguments

<nInteger>
A numeric 32-bit integer value can be specified as first parameter.
<cHex>
Alternatively, the integer can be passed as a hex-encoded character string (see NumToHex()).
<nBitPos>
The position of the bit to test is defined as a numeric value. <nBitPos> defaults to 1, and must be in the range between 1 and 32.

Return

The function returns .T. (true) when the bit at position <nBitPos> is set, otherwise .F. (false) is returned.

Info

See also:NumAND(), NumNOT(), NumOR(), NumXOR(), SetBit()
Category: CT:NumBits , Numbers and Bits
Source:ct\bit2.c
LIB:xhb.lib
DLL:xhbdll.dll


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