table of contents
SNOBOL4LOGIC(3) | CSNOBOL4 Manual | SNOBOL4LOGIC(3) |
NAME¶
snobol4logic - bitwise logic and conversions for SNOBOL4
SYNOPSYS¶
-INCLUDE 'logic.sno'
DESCRIPTION¶
For binary operations, either argument can be INTEGER or STRING (if both string, must be of same length).
- NOT(arg)
- returns bitwise not (complement) of integer argument.
- AND(arg1,arg2)
- bitwise intersection.
- OR(arg1,arg2)
- bitwise union.
- XOR(arg1,arg2)
- bitwise exclusive or (equivalence).
- NAND(arg1,arg2)
- bitwise intersection (first argument complemented).
- NOR(arg1,arg2)
- bitwise union (first argument complemented).
- UPLUS(arg1,arg2)
- unsigned addition.
- UMINUS(arg1,arg2)
- unsigned subtraction.
- UMUL(arg1,arg2)
- unsigned multiplication.
- UDIV(arg1,arg2)
- unsigned division.
- SHL(arg1,arg2)
- shift left.
- SHR(arg1,arg2)
- shift right.
- SAR(arg1,arg2)
- arithmetic (signed) shift right.
- ROL(arg1,arg2)
- rotate left.
- ROR(arg1,arg2)
- rotate right.
- HI(str)
- convert base 16 string to integer.
- IH(int)
- convert integer to base16 string.
- DIB(str,n)
- convert base n string to integer.
- IDB(int,n)
- convert integer to base n string.
COMPATIBILITY¶
compatible with Catspaw SPITBOL LOGIC function.
SEE ALSO¶
AUTHOR¶
Philip L. Budne
March 31, 2022 | CSNOBOL4B 2.3.1 |