Core Features

Operators

Learn about the operators Cambo supports.

Operators are symbols or keywords that instruct the compiler to perform mathematical, logical, or relational manipulations on data. And the values or variables that operators act upon are called operands.

There are commonly three types of operators categorized by the number of operands:

  • Unary: operates on a single operand.
  • Binary: operates on two operands.
  • Ternary: operates on three operands.

This page provides a complete list of all of the available operators supported by Cambo.

A full version of this page has not documented!

Built-in Operators

Arithmetic Operators

OperatorTypeDesciptionExample
-UnaryInverts the sign of a number-a
++UnaryIncreases the value of a variable by 1a++ or ++a
--UnaryDecreases the value of a variable by 1a-- or --a
+BinaryAdds together two valuesa + b
-BinarySubstract one value from anothera - b
*BinaryMultiplies two valuesa * b
/BinaryDivide one value by anothera / b
%BinaryReturns the division remaindera % b
**BinaryOne value raised to the power of anothera ** b

Assignment Operators

OperatorTypeDesciptionExampleEquivalent To
=BinaryAssigna = ba = b
+=BinaryAdd and assigna += ba = a + b
-=BinarySubstract and assigna -= 1a = a - b
*=BinaryMultiply and assigna *= 1a = a * b
/=BinaryDivide and assigna /= 1a = a / b
%=BinaryModulus and assigna %= 1a = a % b
**=BinaryPower and assigna **= ba = a ** b
&=BinaryBitwise AND and assigna &= ba = a & b
|=BinaryBitwise OR and assigna |= ba = a | b
^=BinaryBitwise XOR and assigna ^= ba = a ^ b
>>=BinaryLeft shift and assigna >>= ba = a >> b
<<=BinaryRight shift and assigna <<= ba = a << b

Comparision Operator

OperatorTypeNameExample
==BinaryEqual toa == b
!=BinaryNot equala != b
>BinaryGreater thana > b
<BinaryLess thana < b
>=BinaryGreater than or equal toa >= b
<=BinaryLess than or equal toa <= b

Logical Operator

Operands must be boolean expressions.
OperatorTypeNameDesciptionExample
!UnaryLogical notReverse the result, returns false if the result is true!a
&&BinaryLogical andReturns true if both statements are truea && b
||BinaryLogical orReturns true if one of the statements is truea || b
Copyright © 2026