[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
##############################################################################
###+--------+#################################################################
#+-| BITSET |--------------------------------+################################
#| +--------+ Sets the Nth bit in a variable |################################
#+-------------------------------------------+################################
##############################################################################
##############################################################################
#+--| Summary |--------------+################################################
#|     #INCLUDE math.hdr     |################################################
#+---------------------------+################################################
##############################################################################
##############################################################################
#+--| Syntax |----------------------------------------------+#################
#|     PROCEDURE bitset PROTOTYPE                           |#################
#|      PARAMETERS UNTYPED param, VALUE UINT bit_number     |#################
#+----------------------------------------------------------+#################
##############################################################################
##############################################################################
#######+---| Description |--------------------------------------------+#######
#######| The bitset procedure set on the bit_number bit within param. |#######
#######| ------------------------------------------------------------ |#######
#######| bit_number is zero based.  That is, the 1st bit within param |#######
#######| is considered bit 0 and is the low order bit.  bit_number    |#######
#######| may range from 0 to 31.                                      |#######
#######+--------------------------------------------------------------+#######
##############################################################################
##############################################################################
#########+--| Example 1 |-------------------------------------------+#########
#########| *    Turn on "blinking bit" of color attribute           |#########
#########|                                                          |#########
#########| bitset( __color_std, 7 )                                 |#########
#########+----------------------------------------------------------+#########
##############################################################################
##############################################################################
#########+--| Example 2 |-------------------------------------------+#########
#########| *    Force a number to take an odd value.                |#########
#########|                                                          |#########
#########| bitset( value, 0 )                                       |#########
#########+----------------------------------------------------------+#########
##############################################################################

See Also: bittest()
This page created by ng2html v1.05, the Norton guide to HTML conversion utility. Written by Dave Pearson