An Introduction to Dragon/Lessons/Operators

Operators
In this chapter we will introduce the operators provided by the Dragon programming language.

Arithmetic Operators
The next table presents all of the arithmetic operators provided by the Dragon language. Assume variable x = 50 and variable y = 10, then:

Relational Operators
The next table presents all of the relational operators provided by the Dragon language. Assume variable x = 50 and variable y = 10, then:

Logical Operators
The next table presents all of the logical operators provided by the Dragon language. Assume variable x = true and variable y = false, then:

Bitwise Operators
The next table presents all of the bitwise operators provided by the Dragon language. Assume variable x = 8 and variable y = 2, then:

Assignment Operators
The next table presents all of the assignment operators provided by the Dragon language.

Assume variable x = 8, then:

Operator Precedence
The next table presents operators from highest precedence (evaluated first) to lowest precedence.

Example: