HyperMath

Expressions

Expressions

Previous topic Next topic No expanding text in this topic  

Expressions

Previous topic Next topic JavaScript is required for expanding text JavaScript is required for the print function  

Expressions are evaluated to perform calculations which may assign values to variables or pass arguments to functions.

The values can easily be assigned to a variable.  For example:

> x = 7

> print(x)

7

 

> x = 7

> y = x   //Value of x is assigned to y

> print(y)

7

Operators precedence of 'and' and 'or'
 
The precedence of the 'and' operator is higher than the 'or' operator.
 
For example, X || Y && Z will be evaluated as X||(Y&&Z).
 
To avoid confusion, using parentheses is recommended for complex expressions.