assignment operator "="
syntax: expr1 = expr1
e.g. a=2.0; a=b=c=0; ? a=(b=(c = 0));
other (op=) combinations: e.g. += ,-= ,*= ,/= ,%=
syntax: expr1 op= expr2
semantic: ? expr1 = (expr1) op (expr2)
e.g. j *= k + 3 ? j = j * (k + 3)
y <<= 2 ? y = y << 2
Previous slide
Next slide
Back to first slide
View graphic version