Write Your First Visual Basic Program
More Complicated
Expressions
You can use the following operators in
expressions:
+ |
Plus |
- |
Minus |
* |
Multiply |
/ |
Division |
( |
Openning parenthesis |
) |
Closing parenthesis |
^ |
Power |
For example, this is a valid
expression:
(Blah + 5) * MySecondVariable - (4 + 10 / Blah)
The order of the operators are like in math:
First
"(" and ")" , then "^", then "*" and "/", and at last "+" and "-"
For
example:
2 + 3 * 4 is equal to 14
(2 + 3) * 4 is equal to 20