急!将十六进制的数转换成十进制数

helei33 2002-04-28 02:17:50
那位兄台有将十六进制的数转换成十进制数的函数,给小弟一个谢了!!
...全文
70 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
xdk 2003-01-18
  • 打赏
  • 举报
回复
Function sixteentoten(sixteen As Variant) As Variant
ten = CLng("&H" & sixteen)
sixteentoten = ten

End Function
孟子E章 2002-04-28
  • 打赏
  • 举报
回复
If you get string input of numbers in a representation other than
decimal representation you can use
parseInt('string', numberBase)
to convert that input to a decimal number for example
var sixteenHex = '10';
var sixteen = parseInt(sixteenHex, 16);
to convert from hex to decimal,
var sixteenBinary = '10000';
var sixteen = parseInt(sixteenBinary, 2);
to convert form binary to decimal,
var sixteenOctal = '20';
var sixteen = parseInt(sixteenOctal, 8);
to convert from octal to decimal.
julyclyde 2002-04-28
  • 打赏
  • 举报
回复
比如某16进数字在字符型变量HEXDIGIT中
10进的就是: clng("&H" &HexDigit)

28,391

社区成员

发帖
与我相关
我的任务
社区描述
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
社区管理员
  • ASP
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧