Operators


Mathematical and Text operators

OperatorDefinition Example Result 
Exponent (power of) 5 ^ 2 25 
Multiply 6 * 5 30 
Divide 100 / 4 25 
Add 6 + 4 10 
Subtract 10 - 5 
Mod Remainder of division 25 Mod 7 
Integer division 25 \ 9 
String concatenation "Usama" & " " & "Hafeez" "Usama Hafeez" 

Note that the order of operators is determined by the usual rules in programming. When a statement includes multiple operations the order of operations is:
Parentheses ( ), ^, *, /, \, Mod, +, -

Logical operators

Operator Definition Example Result 
Equal to 12 = 15 False 
Greater than 15 > 11 True 
Less than 15 < 7 False 
>= Greater or equal 20 >= 20 True 
<= Less or equal 6 <= 14 True 
<> Not equal 8 <> 8 False 
AND Logical AND (5 = 5) AND (6 = 5) False 
OR Logical OR (5 = 5) OR (6 = 5) True

Comments

Popular posts from this blog

NICOSIA