Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Nanforum Toolkit v2.1 Reference Guide - <b>ft_isbiton()</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 FT_ISBITON()
 Determine the state of individual bits in a number
------------------------------------------------------------------------------

 Syntax

      FT_ISBITON( <nNumber>, <nBit> ) -> lResult

 Arguments

     <nNumber> is an integer for which a bit state needs to be checked.

     <nBit> is a number from 0 to 15 that indicates which bit to test.

 Returns

     .T. if the specified bit was on., .F. if off.

 Description

     This function is useful when dealing with binary integers.  It will
     come in very handy if you use the FT_INT86() function, because the
     CPU flags are returned as a series of bits.  Using this function, you
     can determine the state of each CPU flag.

 Examples

     if FT_ISBITON( nCPUFlags, 0 )
        Qout( "The carry flag was set." )
     endif

     if FT_ISBITON( nCPUFlags, 7 )
        Qout( "The sign flag was set." )
     endif

 Source: ISBITON.PRG

 Author: Ted Means

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson