/ * =================== 十 进 转 二 进函 g g g g ============================================================================================================================================================== Function Name: GF_BINTOHEX Parameter Description: String Type 1, S_HEX Hex Strings
Note: Function: Convert hex strings into binary strings. Return Value: Binary strings.
Illegal hexadecimal string return -1; returns an empty string Null Author: Fei Yin Chi Date: 2005/2/4 ======================= ======================================================== * / INT Li_LEN, LI_LOOPSTRING LS_RETURNIF UPPER (LEFT (S_HEX, 1)) = 'h' Then S_HEX = MID (S_HEX, 2) // Removal Sign LI_LEN = LEN (S_HEX) for Li_LOOP = 1 to Li_len Choose Case MID (S_HEX , li_loop, 1) case '0' ls_return = ls_return '0000' case '1' ls_return = ls_return '0001' case '2' ls_return = ls_return '0010' case '3' ls_return = ls_return '0011' case '4' ls_return = ls_return '0100' case '5' ls_return = ls_return '0101' case '6' ls_return = ls_return '0110' case '7' ls_return = ls_return '0111' case '8' ls_return = ls_return '1000' case '9' ls_return = LS_RETURN '1001' CASE 'A', 'A' LS_RETURN = LS_RETURN '1010' Case 'B', 'B' Ls_RETURN = LS_RETURN '1011' Case 'C', 'c' Ls_RETURN = LS_RETURN '1100' Case 'd ',' d 'ls_return = ls_return ' 1101 'Case' E ',' E 'LS_RETURN = LS_RETURN ' 1110 'Case' F ',' F '