Appendix B

B.1.Operator Precedence


OperatorOrder
(left
NOTright
* /left
+ -left
< <= > >=left
= != <>left
ANDleft
ORleft

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 OperandRight Operand
LongFloatVariableBoolean
LongLongFloatVariableBoolean/False a
FloatFloatFloatVariableBoolean/False
VariableVariableVariableErrorBoolean/False
BooleanBoolean/FalseBoolean/FalseBoolean/FalseBoolean/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 OperandRight Operand
LongFloatVariableBoolean
LongLongFloatErrorBoolean/False b
FloatFloatFloatErrorBoolean/False
VariableVariableVariableErrorBoolean/False
BooleanBoolean/FalseBoolean/FalseBoolean/FalseBoolean/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 OperandRight Operand
LongFloatVariableBoolean
LongBoolean/True aBoolean/TrueBoolean/TrueBoolean/Right b
FloatBoolean/TrueBoolean/TrueBoolean/TrueBoolean/Right
VariableBoolean/TrueBoolean/TrueBoolean/TrueBoolean/Right
BooleanBoolean/LeftBoolean/LeftBoolean/LeftBoolean

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 OperandRight Operand
LongFloatVariableBoolean
LongBooleanBooleanBooleanBoolean/False a
FloatBooleanBooleanBooleanBoolean/False
VariableBooleanBooleanErrorBoolean/False
BooleanBoolean/FalseBoolean/FalseBoolean/FalseBoolean

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 OperandRight Operand
LongFloatVariableBoolean
LongBooleanBooleanBooleanBoolean/False a
FloatBooleanBooleanBooleanBoolean/False
VariableBooleanBooleanBooleanBoolean/False
BooleanBoolean/FalseBoolean/FalseBoolean/FalseBoolean/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 OperandReturn Type
LongLong
FloatFloat
VariableVariable
BooleanBoolean/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.