CT_NUMOR

 NUMOR()
 Performs a 16-bit "OR" of a list of numbers
------------------------------------------------------------------------------
 Syntax

     NUMOR(<nWORD1|cHexWORD1>,<nWORD2|cHexWORD2>,
        [<nWORDncHexWORDn>]) --> nWORD-OR

 Argument

     <nWORD1|cHexWORD1>...<nWORDn|cHexWORDn>  Designates either decimal
     numbers or hexadecimal digit strings.

 Returns

     The returned value corresponds to all the values designated as
     parameters joined with a logical OR.

 Description

     NUMOR() allows you to target and set a single bit or multiple bits.  For
     example, use this to set a file attribute.

 Note

     .  An invalid parameter returns a result of -1.

 Example

     Set bit 5 in the MCR interface register of port 1, without changing any
     other bits:

     The register contains:      00000011
     The constant in binary:     00010000
                                 ________
     The result: (19)            00010011
     COM_MCR(1, NUMOR(COM_MCR(1), 16))

See Also: NUMAND() NUMNOT() NUMXOR() SETBIT() ISBIT()

 

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.