Skip to main content

2.7) Equal Sign '=' Is An Assignment Operator


The equals sign in programming is very different to math. For example in math there wouldn’t be much use in saying.

A=A+1.0

What value could A take to make the two sides equal, but in programming this is perfectly acceptable and often used.

In programming the equals sign is an assignment statement. The right hand side (RHS) is worked out and then assigned to the variable on the left hand side (LHS).