Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- GT_LIB v1.0 Reference Guide Release 1.0 - <b>test the setting of a flag in a bit flag string.</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 Test the setting of a flag in a bit flag string.
------------------------------------------------------------------------------

 Syntax

        GT_IsFlag(<cFlagString>,[<nFlag>]) --> lSetting

 Arguments:

      <cFlagString> is a bit flag string created with GT_NewFlag()

      <nFlag> is the flag to be tested.

 Returns:

      A boolean value, TRUE if the flag is on, FALSE if it's off.

 Description:

      GT_IsFlag() is used to test the state of a flag with a bit flag
      string.

 Examples:


      // Print the setting of the flags in a flag string called ``cDave''

      for nFlag := 1 to (len(cDave)*8)
         ? "Flag number ",nFlag," == ",GT_IsFlag(cDave,nFlag)
      next

 Source: BITFLAGS.C

 Author:  Dave Pearson

See Also: GT_NEWFLAG() GT_SETFLAG() GT_CLRFLAG()

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