Basic - operatorsOperators perform an operation between the operands, this operation can be mathematical, logical, or bitwise.
Are used to perform mathematical operations. the following are basic operations between the arithmetic operators:
8 + 12 ' 20 100 - 2 ' 98 5 * 5 ' 25 50 / i ' 2.5 70 \ 8 ' 8 70 mod 8 ' 6
We have more of the bitwise operators, using the bitwise operator we can set or determine the specific bit in whole numbers.
&Hff and &H05 ' 0x05 &H01 or &H02 ' 0x03 not 2 &H1A xor &H1A
The main use of the relational operators is in control of conditional statements. thanks to these, we can decide which direction to continue the conditional statements, or for example, how many iterations of the cycle need to perform.
5 < 3 ' true x > 3.14 ' y <= x ' ... &Hff >= y ' ... x = 6 y <> 25
Examples - Basic
BasicOther pieces of example codes:
z = (x-y)-30.5
5 < 3
(i and j) <> 64
x * 2 / y +5
631 xor (&HF0 xor k)
Operators in another programming language: