Operators
Operators are an intrinsic part of the definition of a programming language. They establish the way in which one or more operands are resolved by an operation expressed through a predefined symbol in the language.
To have a clearer idea of how an operator works, let's remember how we use arithmetic operators in real life:
4 + 5
As we know, if we find the + symbol located between two numbers, this indicates that when executing the operation, both operands 4
and 5
will be solved by an addition operation, returning 9
.
We call this operation a binary arithmetic operation since it involves two operators and is defined as employing an arithmetic calculation. Still in a language, we have a set of several diverse types of operators.
In the next subsections, we will explore each available operator in Bosque.
Unary operators
Bosque supports three types of unary operations that are defined by a symbol at the beginning of an expression. The following table...