BubbleLang/Operators

From Esolang
Jump to navigation Jump to search

Main page: BubbleLang

Monocular operators

Monocular operators
Operator Meaning
!x If x will return True then return False.
~x Get (-x)-1.

Binocular operators

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

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. (I'll just say I got inspiration from Python, you don't fucking believe it yet)