Assign a variable size according to a condition

In reply to theketi:

I recommend making the variable the largest you would need in every use mode and ignoring/bit-masking the unneeded bits.