8.5 Rank of operators

Most operators are available as binary operators. These require two operands to which they are applied. Unnary operators, on the other hand, only change one operand. A distinction is made between the individual operations according to priority and associativity if there are at least two operators in a statement.

OperatorPriority - Rank - Ranking
- sign, NOT maximal
IS 11
& 9
&/ 8
^ 7
* / DIV \ MOD % 6
+ - 5
OR AND AND XOR2

Table 8.5.1: Ranking of operators

Example:

[1] Dim sElement As String
[2] Dim aMatrix As String[]
[3]
[4] ...
[5] aMatrix = Split(tts, " ")
[6] For Each sElement In aMatrix
[7]   ' If TypeOf(Val(sElement)) <= gb.Float = True Then
[8]     If [TypeOf(Val(sElement)) <= gb.Float] = True Then
[9]   ' If (IsNumber(Val(sElement)) = True) = True Then ' No error message
[10]    sText = sText & " " & sElement
[11]    ...
[12] Next ' sElement
[13] ...

The code in line 7 triggered an error. The following error message came up, which at the same time pointed the right way:

Unclear expression. Please insert square brackets in FMain.class:1234

But also with round brackets the error message disappeared, as the adequate source code in line 9 showed.