/* $DOC$ $NAME$ ft_BitSet() $CATEGORY$ String $ONELINER$ Set selected bit in a byte $SYNTAX$ ft_BitSet( , ) -> cByte $ARGUMENTS$ is a character from hb_BChar( 0 ) to hb_BChar( 255 ). is a number from 0 to 7 conforming to standard right-to-left bit numbering convention and representing the position of the bit within the byte. $RETURNS$ Returns new byte, with designated bit set. If parameters are faulty, returns NIL. $DESCRIPTION$ In effect, ORs argument byte with a byte that has only the target bit set. If bit is already set, it remains set. Note: Calls ft_IsBit() which is also in this Library. This function is presented to illustrate that bit-wise operations are possible with Clipper code. For greater speed, write .c or .asm versions and use the Clipper Extend system. $EXAMPLES$ // This code would set bit 4 in a byte represented by hb_BChar( 107 ): cNewbyte := ft_BitSet( hb_BChar( 107 ), 4 ) ? hb_BCode( cNewbyte ) // result: 123 ? cNewbyte // result: "{" // This code would set bit 5 in the byte represented by the letter "A". ? ft_BitSet( "A", 5 ) // result: "a" // bit 5 set $SEEALSO$ ft_BitClr(), ft_IsBit() $END$ */