Dampe Posted January 30, 2009 Posted January 30, 2009 (edited) how can I convert hex to a decimal? sv5 con rsv ipv4 destip port 0x05 01 00 01 8009A01B 0050 need to convert destip and port, so really it would be 80.09.A0.1B Where the hex numbers change to decimal thanks Edited January 30, 2009 by Dampe
azure Posted January 30, 2009 Posted January 30, 2009 how can I convert hex to a decimal? sv5 con rsv ipv4 destip port 0x05 01 00 01 8009A01B 0050 need to convert destip and port, so really it would be 80.09.A0.1B Where the hex numbers change to decimal thanks ConsoleWrite(Dec("8009A01B")) It's in the help file
Dampe Posted January 30, 2009 Author Posted January 30, 2009 ConsoleWrite(Dec("8009A01B")) It's in the help file Oh damn, I was looking for _HexToDec or simular.. Thanks
azure Posted January 30, 2009 Posted January 30, 2009 Oh damn, I was looking for _HexToDec or simular.. Thanks Sloppy $test = "8009A01B" $i = 0 Dim $a[4] Do $a[$i] = StringLeft($test,2) ;ConsoleWrite($a[$i]&@CRLF) $test = StringRight($test, StringLen($test)-2) $i = $i + 1 Until $i = 4 ConsoleWrite($a[0]&$a[1]&$a[2]&$a[3]&" = "&Dec($a[0])&"."&Dec($a[1])&"."&Dec($a[2])&"."&Dec($a[3])&@CRLF)
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now