# Operators

Alinous-Core has operators below.

• Execute operaion to the variable
• Relational Operators

## Binary Operators

Binary operators has 2 operands and return operated value. Next table show you the operator, and the order is one of the priority.

 Operator Example Operation * \$val * 10 Multiplication / \$val / 10 Division % \$val % 10 Modulo + \$val + 10 Add Integer or double value. If one of the value is string, concatinate them. - \$val - 10 Subtraction

Monadic Operators are below. The priority order of execution is greater than binary operators.

 Operator Example Operation ++ \$i++ Add 1, and returns current valus ++ ++\$i Add 1, and returns added value -- \$i-- Subtract 1, and returns current valus -- --\$i Subtract 1, and returns added value

## Relational Operators

Relational operators are below.

 Operator Example Operation < \$i < \$j Returns true when left value is less than right one <= \$i Returns true when left value is less than or equals right one > \$i < \$j Returns true when left value is greater than right one >= \$i >= \$j Returns true when left value is greater than or equals right one == \$i == \$j Returns true when left value equals right one

## Logical Operators

Logical operators are below.

 Operator Example Operation && \$a == \$b && \$c > \$d Both 2 expressions are true, return true ｜｜ \$a == \$b || \$c > \$d One of 2 expressions is true, return true

Go to Top  