78
6.2 Operator Precedence
When an expression contains more than one operator, BHT-BASIC performs the operations in
the standard precedence as shown below.
Precedence
1.
Parentheses ( )
The parentheses allow you to override operator precedence; that is, operations
enclosed with parentheses are first carried out.
For improving the readability of an expression, you can use parentheses to separate
two operators placed in succession.
2.
Function operations
3.
Arithmetic operations
4.
Relational operations
=, <>, ><, <, >, <=, >=, =<, =>
5.
Logical operations
6.
String operations
Operations
Arithmetic Operators
Precedence
Negation
_
1
Multiplication and division
*
and
/
2
Modulo arithmetic
MOD
3
Addition and subtraction
+
and
_
4
Operations
Logical Operators
Precedence
Logical negation
NOT
1
Logical multiplication
AND
2
Logical addition
OR
3
Exclusive logical addition
XOR
4
Summary of Contents for BHT-BASIC 100 SERIES
Page 1: ......
Page 161: ...153 Chapter 10 Sleep Function CONTENTS 10 1 Sleep Function 154...
Page 163: ...155 Chapter 11 Resume Function CONTENTS 11 1 Resume Function 156...
Page 173: ...165 Chapter 13 Backlight Function CONTENTS 13 1 Backlight Function 166...
Page 249: ...241 Example CLOSE IF kyIn Y THEN KILL Master Dat END IF Reference Statements CLFILE...