operator <<=

S

shabbir

<< operator is a leftshift operator and <<= combines the left shift
operator with the assignment operator
 
R

Ron Natalie

Brian said:
It is the same as writing: x = x << 6;
But its easier to optimize for the compiler

The second statement is extremely dubious. I can't
imagine any compiler that would care.
 
R

Richard Cavell

The second statement is extremely dubious. I can't
imagine any compiler that would care.

Perhaps it's easier for the programmer to conceptualise. For example,
it makes clear that the source and destination operand are the same, and
that there is something transitive about the variable. (So if your code
is full of const things that are used on the right hand side of an
assignment, this ain't a const).
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,431
Messages
2,571,678
Members
48,796
Latest member
Greg L.

Latest Threads

Top