• Want to receive the latest contracting news and advice straight to your inbox? Sign up to the ContractorUK newsletter here. Every sign up will also be entered into a draw to WIN £100 Amazon vouchers!

Who'd be a game dev...

How can you leave the top bits undefined? You'd **** the value up.

Spod - In "I ******* Despair" mode!

It doesn't matter if you are only after the lower bits. It's faster than padding unnecessarily.

Another bloke who does not know his limitations.
 
I'm with DA on this one, reading this thread is interesting but also completely over my head. Can someone give a small example of >> << <<< and >>> in some code please so I have a better chance of actually keeping up
 
I think it's a bit over the line trolling on technical stuff like AL is doing, people might think he's correct and muck up their work!
 
It doesn't matter if you are only after the lower bits. It's faster than padding unnecessarily.

Another bloke who does not know his limitations.

So, by your logic...


unsigned int a = 4;

a = a >> 1;

The answer could be unpredictable? Sorry mate you failed the interview. :winker:
 
So, by your logic...


unsigned int a = 4;

a = a >> 1;

The answer could be unpredictable? Sorry mate you failed the interview. :winker:

Right shifting a negative signed integer is undefined. Or rather , the result is platform and compiler dependent.

You wouldn't be interviewing me pal.
 
Right shifting a negative signed integer is undefined. Or rather , the result is platform and compiler dependent.

You wouldn't be interviewing me pal.

You're damn right I wouldn't, you wouldn't make it past DodgyAgent.
 

Advertisers

Back
Top