漏了一个num=0的情况。
PARAMETERS num
*num = 1234567890
creturn=""
ALINES(aHex,"0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F",",")
IF num=0 &&单独提出来运行是不是会快点?
RETURN "0x0"
ENDIF
DO WHILE num >0
creturn=aHex(num%16+1)+creturn
*? aHex[num%16+1]
*!* IF num=0 &&运行可能会慢点
*!* EXIT
*!* else
num = INT(num/16)
*!* ENDIF
ENDDO
RETURN "0x"+creturn
[此贴子已经被作者于2023-1-24 23:18编辑过]