FT_BYTEOR

FT_BYTEOR()
 Perform bit-wise OR on two ASCII characters (bytes)

 Syntax

      FT_BYTEOR( <cByte1>, <cByte2> ) -> cNewByte

 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 bit-wise byte manipulation.  In effect, this is a
     bit-by-bit OR operation.  Equivalent to OR 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 OR on two bytes represented
          by CHR(20) and CHR(10):

          cNewByte := FT_BYTEOR( CHR(20), CHR(10) )
          ? ASC( cNewByte )  // result: 30
          ? cNewByte         // result: non-printable character

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

 Source: BYTEOR.PRG

 Author: Forest Belt, Computer Diagnostic Services, Inc.

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



One response to “FT_BYTEOR

  1. Pingback: FT String | Viva Clipper !

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.