Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- LanMan Library Reference Guide - <b>ll_isbiton()</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 LL_ISBITON()
 Check if a certain bit in an integer is on or off
------------------------------------------------------------------------------

 Syntax

      LL_IsBitOn( <nInteger>, <nBit> ) -> lResult

 Arguments

     <nInteger> is a 16-bit integer for which the bit state needs to
     be checked

     <nBit> is a number between 0 and 15 indicating which bit to test

 Returns

     <lResult>, which is .T. if the specified bit was on, .F. if it was off

 Description

     LL_IsBitOn() can be used to check if a specific bit in a 16-bit
     integer number is on or off. One obvious use is for examining the
     file attributes returned by LF_FindFirst() and related functions in
     the LFN Library.

     LL_IsBitOn() is approximately six times faster than FT_IsBitOn()
     from the Nanforum Toolkit. Other than that, the two functions are
     interchangeable.

     #defines for the attribute bits and for the elements in the fileinfo
     array returned by LF_FindFirst() and related functions in the LFN
     Library can be found in the LFNLIB.CH header file.

 Examples

     // aFileInfo has previously been returned by LF_FindFirst(). Now
     // examine the LFN_ATT element to see if it is a hidden file:
     if LL_IsBitOn( aFileInfo[LFN_ATT], LFN_HIDBIT )
        ? 'The file is hidden'
     else
        ? 'The file is not hidden'
     endif

 Header File: LFNLIB.CH

 Source: ISBITON.ASM

 Author: Klas Engwall <klas.engwall@engwall.com>

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