Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Nanforum Toolkit v2.1 Reference Guide - <b>ft_byteneg()</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 FT_BYTENEG()
 Perform bit-wise negation on an ASCII character
------------------------------------------------------------------------------

 Syntax

      FT_BYTENEG( <cByte> ) -> cNewByte

 Arguments

     <cByte> is a character from CHR(0) to CHR(255).
     May be passed in CHR() form, as character literal, or
     as expression evaluating to CHR() value.

 Returns

     Returns resulting byte, in CHR() form.  If parameters are faulty,
     returns NIL.

 Description

     Can be used for bit-wise byte manipulation.  In effect, this is a
     bit-by-bit NEG (two's complement) operation.  Equivalent to NEG
     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 performs a bit-wise NEG on byte represented by CHR(32):

          cNewByte := FT_BYTENOT(CHR(32))
          ? asc(cNewByte)                  // result: 224

     For a demonstration of Clipper bit manipulations, compile and
     link the program BITTEST.PRG in the Nanforum Toolkit source code.

 Source: BYTENEG.PRG

 Author: Forest Belt, Computer Diagnostic Services, Inc.

See Also: FT_BYTEOR() FT_BYTEXOR() FT_BYTENOT() FT_BYTEAND()

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