F
Felix Kater
Hi,
when I use something like
int Shift= 3;
long Value= 1 << Shift;
What is the data type of the const value '1' here? In other terms: What
is the possible maximum of 'Shift' here?
If I want to make sure to make the shift operation work on at least
32 bit (given a 32 bit system) does it help to cast or is it senseless:
long Value=((unsigned int)1) << Shift;
Felix
when I use something like
int Shift= 3;
long Value= 1 << Shift;
What is the data type of the const value '1' here? In other terms: What
is the possible maximum of 'Shift' here?
If I want to make sure to make the shift operation work on at least
32 bit (given a 32 bit system) does it help to cast or is it senseless:
long Value=((unsigned int)1) << Shift;
Felix