作者在 2016-10-10 12:30:46 发布以下内容
?DECTOHEX(31)
?DECTOHEX(ASC([红]))
?DECTOHEX(ASC(SUBS([红],1,1))) + DECTOHEX(ASC(SUBS([红],2,1)))
*--------------------------------------------------------------------------------
*十进制转十六进制函数
*--------------------------------------------------------------------------------
FUNCTION DECTOHEX
PARAMETERS INNUM
CSTR=[]
DO WHILE INNUM>0
CSTR=IIF(BETWEEN(MOD(INNUM,16),10,15),CHR(MOD(INNUM,16)+55),TRANSFORM(MOD(INNUM,16)))+CSTR
INNUM=INT(INNUM/16)
ENDDO
RETURN CSTR