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>set a number of flags to true in a bit flag string.</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 Set a number of flags to TRUE in a bit flag string.
------------------------------------------------------------------------------

 Syntax

        GT_SetFlag(<cFlagString>,[<nStart>],[<nEnd>]) --> cFlagString

 Arguments:

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

      <nStart> is the starting flag. This is an optional numeric value.
      If not supplied it defaults to 1.

      <nEnd> is the ending flag. This is an optional numeric value. If
      not supplied it defaults to <nStart>.

 Returns:

      The bit map string with the new flag settings.

 Description:

      GT_SetFlag() is used to turn flags within the flag string on.

 Examples:

      cFlags := GT_NewFlag(20)   // Create a bit flag string for 20
                                 // logical values.

      // Now set flags 10 to 15 to true.

      cFlags := GT_SetFlag(cFlags,10,15)

      // And set flag 18 to true.

      cFlags := GT_SetFlag(cFlags,18)

      // And set flag 1 to true.

      cFlags := GT_SetFlag(cFlags)

 Source: BITFLAGS.C

 Author:  Dave Pearson

See Also: GT_NEWFLAG() GT_CLRFLAG() GT_ISFLAG()

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