We are currently working on new rules for what content should and shouldn't be allowed on this website, and are looking for feedback! See Esolang:2026 topicality proposal to view and give feedback on the current draft.
BubbleLang/Operators
Jump to navigation
Jump to search
Main page: BubbleLang
Monocular operators
| Operator | Meaning |
|---|---|
| !x | If x will return True then return False. |
| ~x | Get (-x)-1. |
Binocular operators
| Operator | Meaning |
|---|---|
| x+y | Returns the sum of x and y. |
| x-y | Returns the difference between x and y. |
| x*y | Returns the product of x and y. |
| x/y | Returns the number of x divided by y. |
| x//y | Returns the quotient of x divided by y. |
| x%y | Returns the remainder of x divided by y. |
| x&&y | If both x and y are True, the result is True. |
| x||y | If one of x and y is true, the result is true. |
| x&y | Returns the result of x bitwise AND y. |
| x|y | Returns the result of x bitwise OR y. |
| x^y | Returns the result of x bitwise XOR y. |
| x**y | Returns xy. |
| x>y | If x is greater than y, it returns True. |
| x<y | If x is less than y, it returns True. |
| x==y | If x is equal to y, it returns True. |
| x<=y | If x is greater than y, it returns False. |
| x>=y | If x is less than y, it returns False. |
| x!=y | If x is equal to y, it returns False. |
Trinocular operator
| Operator | Meaning |
|---|---|
| z?x:y | If z is True then return x, otherwise return y. |
| x if z else y | If z is True then return x, otherwise return y. To be precise, this is not strictly an "operator", because it actually has two keywords. |