Operators

The Operators available in smalldragon are currently a subset of those available in C. Reference: Operators in C
Comparison Operator Chaining is implemented in smalldragon.

Arithmetic Operators

OperatorDescription
+...
-...
*...
/...
%...

Relational Operators

OperatorDescription
==relational equals
!=relational inequality
>relational greater than
<relational less than
>=relational greater/equals than
<=relational less/equals than

Logical Operators

OperatorDescription
&&logical and
||logical or
!logical negation(unary)

Bitwise Operators

OperatorDescription
& bitwise and
| bitwise or
^ bitwise xor
~ bitwise negation(unary)
<< bitwise left shift
>> bitwise right shift

Assignment Operators

OperatorDescription
= assign a value to a variable
+= increment a variable's value
-= decrement a variable's value
*= multiply a variable's value
/= divide a variable's value
%= modulo a variable's value
++ increment a variable inline
-- decrement a variable inline

Assignment Operators (bitwise)

OperatorDescription
&= -
|= -
<<= -
>>= -