FT_BYTEAND() Perform bit-wise AND on two ASCII characters (bytes) ──────────────────────────────────────────────────────────────────────────────
Syntax
FT_BYTEAND( <cByte1>, <cByte2> ) -> cByte
Arguments
<cByte1> and <cByte2> are characters from CHR(0) TO CHR(255). May be passed in CHR() form, as character literals, or as expressions evaluating to CHR() values.
Returns
Returns resulting byte, in CHR() form. If parameters are faulty, returns NIL.
Description
Can be used for any bit-wise masking operation. In effect, this is a bit-by-bit AND operation. Equivalent to AND assembler instruction.
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 mask out the high nibble (four most significant bits) of the byte represented by chr(123) and leave the low nibble bits as in the parameter byte.