CInt96.Bitwise logical operatorsoperator
AND, EQV, IMP, MOD, OR, SHL, SHR, XOR.
Syntax
OPERATOR AND (BYREF rhs AS CInt96)
OPERATOR AND= (BYREF rhs AS CInt96)
OPERATOR EQV (BYREF lhs AS CInt96)
OPERATOR EQV= (BYREF lhs AS CInt96)
OPERATOR IMP (BYREF rhs AS CInt96)
OPERATOR IMP= (BYREF rhs AS CInt96)
OPERATOR MOD (BYREF rhs AS CInt96)
OPERATOR MOD= (BYREF rhs AS CInt96)
OPERATOR NOT (BYREF rhs AS CInt96)
OPERATOR OR (BYREF rhs AS CInt96)
OPERATOR OR= (BYREF rhs AS CInt96)
OPERATOR SHL (BYVAL nBits AS UINTEGER)
OPERATOR SHL= (BYVAL nBits AS UINTEGER)
OPERATOR SHR (BYVAL nBits AS UINTEGER)
OPERATOR SHR= (BYVAL nBits AS UINTEGER)
OPERATOR XOR (BYREF rhs AS CInt96)
OPERATOR XOR= (BYREF rhs AS CInt96)
Parameters
| Name | Description | |
|---|---|---|
AND | Returns the bitwise-and (conjunction) of two numeric values. | |
EQV | Returns the bitwise-and (equivalence) of two numeric values. | |
IMP | Returns the bitwise-and (implication) of two numeric values. | |
MOD | Returns the remainder from a division operation. | |
NOT | Returns the bitwise-not (complement) of a numeric value. | |
OR | Returns the bitwise-or (inclusive disjunction) of two numeric values. | |
SHL | Shifts the bits of a numeric expression to the left. | |
SHR | Shifts the bits of a numeric expression to the right. | |
XOR | Returns the bitwise-xor (exclusive disjunction) of two numeric values. | |
AND= | Performs a bitwise-and (conjunction) and assigns the result to a variable, | |
EQV= | Performs a bitwise-eqv (equivalence) and assigns the result to a variable. | |
IMP= | Returns the bitwise-and (implication) of two numeric values. | |
MOD= | Divides this CInt96 value and assigns the remainder to it. | |
OR= | Performs a bitwise-or (inclusive disjunction) and assigns the result to a variable. | |
SHL= | Shifts left and assigns a value to a variable. | |
SHR= | Shifts right and assigns a value to a variable. | |
XOR= | Performs a bitwise-xor (exclusive disjunction) and assigns the result to a variable. |
Examples
PRINT CInt96(5) AND CInt96(3) ' 1
DIM int96 AS CInt96 = 5 int96 AND= 3 print int96 ' 1
PRINT CInt96(5) EQV CInt96(3) ' "-7"
DIM int96 AS CInt96 = 5 int96 EQV= 3 PRINT int96 ' 7
PRINT CInt96(5) IMP CInt96(3) ' -5
DIM int96 AS CInt96 = 5 int96 IMP= 3 PRINT int96 ' -5
PRINT CInt96("5") MOD CInt96("3") ' 2
DIM int96 AS CInt96 = -17 int96 MOD= 5 print int96 ' -2
PRINT CInt96(5) OR CInt96(3) ' 7
DIM int96 AS CInt96 = 5 int96 OR= 3 PRINT int96 ' 7
PRINT CInt96(7) SHL 4 ' 112 PRINT CInt96(1) SHL 95 ' 39614081257132168796771975168 PRINT CInt96(-3) SHL 5 ' -96
DIM int96 AS CInt96 = 7 int96 SHL= 4 PRINT int96 ' 112
PRINT CInt96(100) SHR 3 ' 12 PRINT CInt96(-100) SHR 3 ' -13 PRINT CInt96(-3) SHR 1 ' -2 PRINT CInt96(-1) SHR 100 ' -1 PRINT CInt96(5) SHR 2 ' 1 PRINT CInt96(5) SHR 3 ' 0
DIM int96 AS CInt96 = 100 int96 SHR= 3 PRINT int96 ' 12
PRINT CInt96(5) XOR CInt96(3) ' 6
DIM int96 AS CInt96 = -5 int96 XOR= 2 PRINT int96 ' 7
PRINT NOT CInt96(0) ' -1 PRINT NOT CInt96(-1) ' 0
Reference
- Documented in Numeric Datatypes/CInt96 Class.md
- Topic: CInt96 Class