Chaga Programming Language: Chapter 8: Rules for evaluating expressions: operator precedence and datatype conversion

Boolean unary logical operator: NOT

OPERAND 1: RULE
bool (constant)  
bool (datatype)  
integer (constant)  
int (datatype)  
real number (constant)  
float (datatype)  

Boolean expression logical operator: AND

OPERAND 1: OPERAND 2: RULES
bool (datatype) bool (datatype)  
bool (datatype) bool (constant)  
bool (datatype) integer (constant)  
bool (datatype) int (datatype)  
bool (datatype) real number (constant)  
bool (datatype) float (datatype)  
bool (constant) bool (datatype)  
bool (constant) integer (constant)  
bool (constant) int (datatype)  
bool (constant) real number (constant)  
bool (constant) float (datatype)  
integer (constant) real number (constant)  
integer (constant) real number (datatype)  
integer (datatype) real number (constant)  
integer (constant) real number (datatype)  
real number (constant) bool (constant)  
real number (datatype) bool (constant)  

Boolean expression logical operator: OR

OPERAND 1: OPERAND 2: RULES
bool (datatype) bool (datatype)  
bool (datatype) bool (constant)  
bool (datatype) integer (constant)  
bool (datatype) int (datatype)  
bool (datatype) real number (constant)  
bool (datatype) float (datatype)  
bool (constant) bool (datatype)  
bool (constant) integer (constant)  
bool (constant) int (datatype)  
bool (constant) real number (constant)  
bool (constant) float (datatype)  
integer (constant) real number (constant)  
integer (constant) real number (datatype)  
integer (datatype) real number (constant)  
integer (constant) real number (datatype)  
real number (constant) bool (constant)  
real number (datatype) bool (constant)  

Boolean expression logical operator: eXclusive OR (XOR)

OPERAND 1: OPERAND 2: RULES
bool (datatype) bool (datatype)  
bool (datatype) bool (constant)  
bool (datatype) integer (constant)  
bool (datatype) int (datatype)  
bool (datatype) real number (constant)  
bool (datatype) float (datatype)  
bool (constant) bool (datatype)  
bool (constant) integer (constant)  
bool (constant) int (datatype)  
bool (constant) real number (constant)  
bool (constant) float (datatype)  
integer (constant) real number (constant)  
integer (constant) real number (datatype)  
integer (datatype) real number (constant)  
integer (constant) real number (datatype)  
real number (constant) bool (constant)  
real number (datatype) bool (constant)  

Boolean expression comparison operator: GREATER THAN OR EQUAL

OPERAND 1: OPERAND 2: RULES
bool (datatype) bool (datatype)  
bool (datatype) bool (constant)  
bool (datatype) integer (constant)  
bool (datatype) int (datatype)  
bool (datatype) real number (constant)  
bool (datatype) float (datatype)  
bool (constant) bool (datatype)  
bool (constant) integer (constant)  
bool (constant) int (datatype)  
bool (constant) real number (constant)  
bool (constant) float (datatype)  
integer (constant) real number (constant)  
integer (constant) real number (datatype)  
integer (datatype) real number (constant)  
integer (constant) real number (datatype)  
real number (constant) bool (constant)  
real number (datatype) bool (constant)  

Boolean expression comparison operator: GREATER THAN

OPERAND 1: OPERAND 2: RULES
bool (datatype) bool (datatype)  
bool (datatype) bool (constant)  
bool (datatype) integer (constant)  
bool (datatype) int (datatype)  
bool (datatype) real number (constant)  
bool (datatype) float (datatype)  
bool (constant) bool (datatype)  
bool (constant) integer (constant)  
bool (constant) int (datatype)  
bool (constant) real number (constant)  
bool (constant) float (datatype)  
integer (constant) real number (constant)  
integer (constant) real number (datatype)  
integer (datatype) real number (constant)  
integer (constant) real number (datatype)  
real number (constant) bool (constant)  
real number (datatype) bool (constant)  

Boolean expression comparison operator: LESS THAN OR EQUAL

OPERAND 1: OPERAND 2: RULES
bool (datatype) bool (datatype)  
bool (datatype) bool (constant)  
bool (datatype) integer (constant)  
bool (datatype) int (datatype)  
bool (datatype) real number (constant)  
bool (datatype) float (datatype)  
bool (constant) bool (datatype)  
bool (constant) integer (constant)  
bool (constant) int (datatype)  
bool (constant) real number (constant)  
bool (constant) float (datatype)  
integer (constant) real number (constant)  
integer (constant) real number (datatype)  
integer (datatype) real number (constant)  
integer (constant) real number (datatype)  
real number (constant) bool (constant)  
real number (datatype) bool (constant)  

Boolean expression comparison operator: LESS THAN

OPERAND 1: OPERAND 2: RULES
bool (datatype) bool (datatype)  
bool (datatype) bool (constant)  
bool (datatype) integer (constant)  
bool (datatype) int (datatype)  
bool (datatype) real number (constant)  
bool (datatype) float (datatype)  
bool (constant) bool (datatype)  
bool (constant) integer (constant)  
bool (constant) int (datatype)  
bool (constant) real number (constant)  
bool (constant) float (datatype)  
integer (constant) real number (constant)  
integer (constant) real number (datatype)  
integer (datatype) real number (constant)  
integer (constant) real number (datatype)  
real number (constant) bool (constant)  
real number (datatype) bool (constant)  

Boolean expression comparison operator: NOT EQUAL

OPERAND 1: OPERAND 2: RULES
bool (datatype) bool (datatype)  
bool (datatype) bool (constant)  
bool (datatype) integer (constant)  
bool (datatype) int (datatype)  
bool (datatype) real number (constant)  
bool (datatype) float (datatype)  
bool (constant) bool (datatype)  
bool (constant) integer (constant)  
bool (constant) int (datatype)  
bool (constant) real number (constant)  
bool (constant) float (datatype)  
integer (constant) real number (constant)  
integer (constant) real number (datatype)  
integer (datatype) real number (constant)  
integer (constant) real number (datatype)  
real number (constant) bool (constant)  
real number (datatype) bool (constant)  

Boolean expression comparison operator: EQUAL

OPERAND 1: OPERAND 2: RULES
bool (datatype) bool (datatype)  
bool (datatype) bool (constant)  
bool (datatype) integer (constant)  
bool (datatype) int (datatype)  
bool (datatype) real number (constant)  
bool (datatype) float (datatype)  
bool (constant) bool (datatype)  
bool (constant) integer (constant)  
bool (constant) int (datatype)  
bool (constant) real number (constant)  
bool (constant) float (datatype)  
integer (constant) real number (constant)  
integer (constant) real number (datatype)  
integer (datatype) real number (constant)  
integer (constant) real number (datatype)  
real number (constant) bool (constant)  
real number (datatype) bool (constant)  

Numerical expression operator: PLUS

OPERAND 1: OPERAND 2: RULES
bool (datatype) bool (datatype)  
bool (datatype) bool (constant)  
bool (datatype) integer (constant)  
bool (datatype) int (datatype)  
bool (datatype) real number (constant)  
bool (datatype) float (datatype)  
bool (constant) bool (datatype)  
bool (constant) integer (constant)  
bool (constant) int (datatype)  
bool (constant) real number (constant)  
bool (constant) float (datatype)  
integer (constant) real number (constant)  
integer (constant) real number (datatype)  
integer (datatype) real number (constant)  
integer (constant) real number (datatype)  
real number (constant) bool (constant)  
real number (datatype) bool (constant)  

Numerical expression operator: MINUS

OPERAND 1: OPERAND 2: RULES
bool (datatype) bool (datatype)  
bool (datatype) bool (constant)  
bool (datatype) integer (constant)  
bool (datatype) int (datatype)  
bool (datatype) real number (constant)  
bool (datatype) float (datatype)  
bool (constant) bool (datatype)  
bool (constant) integer (constant)  
bool (constant) int (datatype)  
bool (constant) real number (constant)  
bool (constant) float (datatype)  
integer (constant) real number (constant)  
integer (constant) real number (datatype)  
integer (datatype) real number (constant)  
integer (constant) real number (datatype)  
real number (constant) bool (constant)  
real number (datatype) bool (constant)  

Numerical expression operator: TIMES

OPERAND 1: OPERAND 2: RULES
bool (datatype) bool (datatype)  
bool (datatype) bool (constant)  
bool (datatype) integer (constant)  
bool (datatype) int (datatype)  
bool (datatype) real number (constant)  
bool (datatype) float (datatype)  
bool (constant) bool (datatype)  
bool (constant) integer (constant)  
bool (constant) int (datatype)  
bool (constant) real number (constant)  
bool (constant) float (datatype)  
integer (constant) real number (constant)  
integer (constant) real number (datatype)  
integer (datatype) real number (constant)  
integer (constant) real number (datatype)  
real number (constant) bool (constant)  
real number (datatype) bool (constant)  

Numerical expression operator: DIVIDE

OPERAND 1: OPERAND 2: RULES
bool (datatype) bool (datatype)  
bool (datatype) bool (constant)  
bool (datatype) integer (constant)  
bool (datatype) int (datatype)  
bool (datatype) real number (constant)  
bool (datatype) float (datatype)  
bool (constant) bool (datatype)  
bool (constant) integer (constant)  
bool (constant) int (datatype)  
bool (constant) real number (constant)  
bool (constant) float (datatype)  
integer (constant) real number (constant)  
integer (constant) real number (datatype)  
integer (datatype) real number (constant)  
integer (constant) real number (datatype)  
real number (constant) bool (constant)  
real number (datatype) bool (constant)  

Numerical expression operator: MODULO

OPERAND 1: OPERAND 2: RULES
bool (datatype) bool (datatype)  
bool (datatype) bool (constant)  
bool (datatype) integer (constant)  
bool (datatype) int (datatype)  
bool (datatype) real number (constant)  
bool (datatype) float (datatype)  
bool (constant) bool (datatype)  
bool (constant) integer (constant)  
bool (constant) int (datatype)  
bool (constant) real number (constant)  
bool (constant) float (datatype)  
integer (constant) real number (constant)  
integer (constant) real number (datatype)  
integer (datatype) real number (constant)  
integer (constant) real number (datatype)  
real number (constant) bool (constant)  
real number (datatype) bool (constant)  

Copyright © 2025, 2026 Robert James Bruce.

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is available at https://www.gnu.org/licenses/fdl-1.3.html