src/sys/dotnet/perwapi/PERWAPI.cs
/// <summary>
/// Derives a hexademical string for a short value
/// </summary>
/// <param name="b">the short value</param>
/// <returns>hex string for the short value</returns>
Derives a hexademical string for a short value
Derives a hexademical string for a short value
public static String Short(int b) {
            char[] str = new char[4];
            uint num1 = (uint)b & iByteMask[0];
            uint num2 = ((uint)b & iByteMask[1]) >> 8;
            uint b1 = num1 & nibble0Mask;
            uint b2 = (num1 & nibble1Mask) >> 4;
            uint b3 = num2 & nibble0Mask;
            uint b4 = (num2 & nibble1Mask) >> 4;
            str[0] = hexDigit[b4];
            str[1] = hexDigit[b3];
            str[2] = hexDigit[b2];
            str[3] = hexDigit[b1];
            return new String(str);
        }
public static String Short ( int b ) { char [ ] str = new char [ 4 ] ; uint num1 = ( uint ) b & iByteMask [ 0 ] ; uint num2 = ( ( uint ) b & iByteMask [ 1 ] ) >> 8 ; uint b1 = num1 & nibble0Mask ; uint b2 = ( num1 & nibble1Mask ) >> 4 ; uint b3 = num2 & nibble0Mask ; uint b4 = ( num2 & nibble1Mask ) >> 4 ; str [ 0 ] = hexDigit [ b4 ] ; str [ 1 ] = hexDigit [ b3 ] ; str [ 2 ] = hexDigit [ b2 ] ; str [ 3 ] = hexDigit [ b1 ] ; return new String ( str ) ; }
Derives a hexademical string for a short value
Derives a hexademical string for a short value
hex string for the short value
hex string for the short value
b
int
the short value
the short value