コード例 #1
0
        public static String addressToString(UInt32[] address)
        {
            if (address.Length == 0)
            {
                return("");
            }
            String output = GlobalFunctions.toHex(address[0]);
            UInt32 cv;
            char   op;

            for (int i = 1; i < address.Length; i++)
            {
                output = "[" + output + "]";
                cv     = address[i];
                if (address[i] > 0x80000000)
                {
                    op = '-';
                    cv = (UInt32)((long)0x100000000 - (long)cv);
                }
                else
                {
                    op = '+';
                }
                output += op + GlobalFunctions.shortHex(cv);
            }
            return(output);
        }
コード例 #2
0
        public static string addressToString(uint[] address)
        {
            if (address.Length == 0)
            {
                return(string.Empty);
            }
            string output = GlobalFunctions.toHex(address[0]);
            uint   cv;
            char   op;

            for (int i = 1; i < address.Length; i++)
            {
                output = "[" + output + "]";
                cv     = address[i];
                if (address[i] > 0x80000000)
                {
                    op = '-';
                    cv = (uint)(0x100000000 - (long)cv);
                }
                else
                {
                    op = '+';
                }
                output += op + GlobalFunctions.shortHex(cv);
            }
            return(output);
        }