O'Reilly logo

Visual Basic 2005 for Programmers: Deitel Developer Series, Second Edition by Harvey M. Deitel - Deitel & Associates, Inc., Paul J. Deitel - Deitel & Associates, Inc.

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

3.6. Arithmetic

The arithmetic operators are summarized in Fig. 3.19. The asterisk (*) indicates multiplication, and the keyword Mod represents the Mod operator (also known as the modulus or modulo operator), which will be discussed shortly. Most of the arithmetic operators in Fig. 3.19 are binary operators. For example, the expression sum + value contains the binary operator + and the two operands sum and value. Visual Basic also provides unary operators that take only one operand. For example, unary versions of plus (+) and minus () are provided, so that programmers can write expressions such as +9 and 19.

Figure 3.19. Arithmetic operators.
Visual Basic operationArithmetic operatorAlgebraic expressionVisual Basic expression
Addition+f + 7 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required