C+ C NAME: C Bit2to4 C PURPOSE: C Copy an integer in the range [-32768,32767] stored in an integer*2 C variable into an integer*4 variable, preserving the bit pattern of C the least significant 16 bits. C CALLING SEQUENCE: subroutine Bit2to4(I2,I4) C INPUTS: C I2 integer*2 integer in range [-32768,32767] C OUTPUTS: C I4 integer*4 result in range [0,65535] C CALLS: C (none) C PROCEDURE: C The output integer*4 value is in the range [0,65535], i.e. the C most significant 16 bits are all zero. C MODIFICATION HISTORY: C MAR-1992, Paul Hick (UCSD/CASS; pphick@ucsd.edu) C- integer*2 I2 integer*4 I4 I4 = I2 if (I2 .lt. 0) I4 = I4+65536 return end