Skip to content
Jacob Misirian edited this page May 21, 2016 · 1 revision

Hassium has many different types of operators. This page will show the operators by type.

Binary Operator Description
<left> + <right> Adds left and right sides.
<left> - <right> Subtracts right from left.
<left> * <right> Multiplies left by right.
<left> / <right> Divides left by right.
<left> % <right> Takes the remainder of left / right.
<left> & <right> Bitwise and of left and right.
``` ```
<left> ^ <right> Exclusive or of left and right.
<left> << <right> Bitshift left.
<left> >> <right> Bitshift right.
<left> ** <right> Left raised to the power of right.
<left> // <right> Integer division of left and right.
<left> .. <right> Gets a list range of the integers between left and right.
<left> is <right> Checks if the left is of type right.
Comparison Operator Description
<left> == <right> Checks if left equals right.
<left> != <right> Checks if left is not equal to right.
<left> > <right> Checks if left is greater than right.
<left> >= <right> Checks if left is greater or equal to right.
<left> < <right> Checks if left is less than right.
<left> <= <right> Checks if left is less than or equal to right.
Unary Operator Description
++ <target> Increments target, then pushes target.
-- <target> Decrements target, then pushes target.
<target> ++ Pushes target, then increments target.
<target> -- Pushes target, then decrements target.
~ <target> Bitwise complement of target.
! <target> Boolean not of target (true is false, false is true).
Clone this wiki locally