SNOBOL4LOGIC(3)
πΈ SNOBOL4LOGIC(3) πΈ
okay bestie, come sit with me, because this page is from the CSNOBOL4 Manual and it's literally the bit-manipulation bestie you didn't know you needed. it's giving logic, but make it slay. π
β¨ NAME β¨
snobol4logic β bitwise logic and conversions for SNOBOL4. yes, we're doing bits today. no cap. π¦
β¨ SYNOPSYS β¨
(yes, that's how it's spelled up top, we don't fix it, we respect it π«Ά)
-INCLUDE 'logic.sno'
β¨ DESCRIPTION β¨
so for all the binary operations, here's the vibe check: either argument can be INTEGER or STRING β and if both of them are strings, they must be of the same length. that's not a suggestion, that's the law. π
okay now the function lineup, main character energy only:
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.
like, look at that range. logic ops, unsigned math, shifts, rotates, and base conversion? she does it all. π₯
β¨ COMPATIBILITY β¨
compatible with Catspaw SPITBOL LOGIC function. so if you're coming from there, you already know the assignment. π
β¨ SEE ALSO β¨
β¨ AUTHOR β¨
Philip L. Budne
and that's the whole page, bestie!! π this was CSNOBOL4B 2.3.1, dated March 31, 2022 β go forth and manipulate those bits, you absolute icon ππ
π¦ where this page comes from
- fedora 43: snobol4 2.3.1-7.fc43 Β· BSD-2-Clause AND BSD-3-Clause AND BSD-4-Clause AND ISC
- fedora 43: snobol4 2.3.1-7.fc43 Β· BSD-2-Clause AND BSD-3-Clause AND BSD-4-Clause AND ISC
- fedora 44: snobol4 2.3.1-8.fc44 Β· BSD-2-Clause AND BSD-3-Clause AND BSD-4-Clause AND ISC
- fedora 44: snobol4 2.3.1-8.fc44 Β· BSD-2-Clause AND BSD-3-Clause AND BSD-4-Clause AND ISC
- opensuse-leap 16.0: snobol4 2.3.1-160000.2.2 Β· BSD-2-Clause
- opensuse-leap 16.0: snobol4 2.3.1-160000.2.2 Β· BSD-2-Clause
- opensuse-leap 16.0: snobol4 2.3.1-160000.2.2 Β· BSD-2-Clause
- opensuse-leap 16.0: snobol4 2.3.1-160000.2.2 Β· BSD-2-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms