[<<Previous Entry]
[^^Up^^]
[Next Entry>>]
[Menu]
[About The Guide]
ISBIT()
Tests the bits in a number
------------------------------------------------------------------------------
Syntax
ISBIT(<nLONG|cHexLONG>,[<nBitPos>]) --> lSet
Arguments
<nLONG|cHexLONG> Designates either a decimal number or hexadecimal
digit string.
<nBitPos> Designates the bit number to test. The value can lie in
the range of 1 to 32. The default is the least-significant bit.
Returns
When the designated bit is set, the function returns a result of .T..
Description
ISBIT() tests a particular bit within a numeric field, without having to
mask it or do a comparison.
Example
Tests the BREAK bit in the line status register of the COM1 serial
interface:
IF ISBIT(COM_LSR(1), 5)
? "BREAK condition detected!"
ENDIF
See Also:
NUMAND()
NUMNOT()
NUMOR()
NUMXOR()
SETBIT()
This page created by ng2html v1.05, the Norton guide to HTML conversion utility.
Written by Dave Pearson