Urgent - Split Long into 2 Int using BitShift

The following should work to convert the two ints back into a long:

newlong = ((long)H << 16) | L;

But it will depend on the platform and programming environment you are working in to conver it back. This assumes that H and L are two 16 bit variables, and that (long) is a 32 bit variable. On most modern PCs and programming languages, ints are 32 bit variables and longs are 64 bit variables. H and L may need to be declared as shorts and your 32 bit variable just declared as an int. (and the cast would be (int) instead of (long) as well)