December 2001
Beginner
976 pages
22h 4m
English
You have seen what the arithmetic operators are for the basic operations: addition, subtraction, multiplication, division, modulo, and exponentiation. You will learn now a few new operators that are based on these arithmetic operators. They are called in-place arithmetic operators.
Consider the following example, which declares a variable i as Integer and initializes it to 6, and then increments its value by 3.
Dim i As Integer = 6 i = i + 3
It happens that this type of code occurs quite frequently in day-to-day programming. As programmers (and language architects) are practical people, they decided that the expression could be simplified by writing it as:
Dim i As Integer = 6 i += 3
Note how the i was omitted from the ...
Read now
Unlock full access