Chapter 7 Operators

7.1 The Value Assignment Operator

The most commonly used operator in Visual Basic is the value assignment operator ( = ). For example, the following Visual Basic statement assigns a value of 5 to variable x.

x = 5

As you read in Chapter 5, this is equivalent to the left arrow used in flowcharts.

Image

Probably the left arrow used in a flowchart is more convenient and clearer than the ( = ) sign because it visually illustrates that the value or the result of an expression on the right is assigned to a variable on the left.

It's important to note that the ( = ) sign is not equivalent to the one used in mathematics. In mathematics, ...

Get Visual Basic and Algorithmic Thinking for the Complete Beginner now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.