Appendix B

B.1.Operator Precedence

Operator Order
( left
NOT right
* / left
+ - left
<<=> >= left
= != <> left
AND left
OR left


In the operator precedence table, operators at the same level have the same precedence. Operators at the top of the table have the highest precedence. In other words, in expressions with no parenthesizes, these operations would be performed first before a operator with lower precedence.
Order determines whether an operation is performed left to right or right to left.

B.2 Operand Types

There are 4 types of operands in PaleoVu - Float, Long, Variable, and Boolean. Mixing these types and certain operations can produce valid results or errors. Following is a list of tables indicating operator, operand types and resulting value types.

Operators +, -, *

Left Operand Right Operand
Long Float Variable Boolean
Long Long Float Variable Boolean/False a
Float Float Float Variable Boolean/False
Variable Variable Variable Error Boolean/False
Boolean Boolean/False Boolean/False Boolean/False Boolean/False


a. Where Boolean return types have a value, it does not matter what the operand values are, this is the value that is returned.

Operators / a

Left Operand Right Operand
Long Float Variable Boolean
Long Long Float Error Boolean/False b
Float Float Float Error Boolean/False
Variable Variable Variable Error Boolean/False
Boolean Boolean/False Boolean/False Boolean/False Boolean/False


a. Divide by 0 errors are returned as an error.

b. Where Boolean return types have a value, it does not matter what the operand values are, this is the value that is returned.

Operators OR, AND

Left Operand Right Operand
Long Float Variable Boolean
Long Boolean/True a Boolean/True Boolean/True Boolean/Right b
Float Boolean/True Boolean/True Boolean/True Boolean/Right
Variable Boolean/True Boolean/True Boolean/True Boolean/Right
Boolean Boolean/Left Boolean/Left Boolean/Left Boolean


a. Where Boolean return types have a value , it does not matter what the operand values are, this is the value that is returned.

b. When Left of Right are indicated for a Boolean value, the value of the left or right operand is returned regardless of the other operand value.

Operator =, <>

Left Operand Right Operand
Long Float Variable Boolean
Long Boolean Boolean Boolean Boolean/False a
Float Boolean Boolean Boolean Boolean/False
Variable Boolean Boolean Error Boolean/False
Boolean Boolean/False Boolean/False Boolean/False Boolean


a. Where Boolean return types have a value, it does not matter what the operand values are, this is the value that is returned.

Operators <, <=",">, >=

Left Operand Right Operand
Long Float Variable Boolean
Long Boolean Boolean Boolean Boolean/False a
Float Boolean Boolean Boolean Boolean/False
Variable Boolean Boolean Boolean Boolean/False
Boolean Boolean/False Boolean/False Boolean/False Boolean/False


a. Where Boolean return types have a value, it does not matter what the operand values are, this is the value that is returned.

Operator - (unary)

Left Operand Return Type
Long Long
Float Float
Variable Variable
Boolean Boolean/False


a. Where Boolean return types have a value, it does not matter what the operand values are, this is the value that is returned.