QB64.org Forum
Active Forums => QB64 Discussion => Topic started by: JohnUKresults on April 06, 2020, 09:31:34 am
-
Just starting a small project simply to keep my brain ticking over during lockdown.
To save me reinventing the wheel, does anyone have some code for converting a long hex number (mainly 7 hex digits but optional at 12 digits as well) from hex to decimal?
Also the reverse may prove useful at some point.
I can provide some sample codes to save you making them up if that would help.
Thanks
-
INPUT "Enter your hex$:", h$
PRINT "The hex$ value of 123456 is: ";
HEX$(123456)
https://www.qb64.org/wiki/HEX$
https://www.qb64.org/wiki/%26H
-
ok thanks - knew there would be a simple way to do it!
-
Hi
Thanks - works fine as long I use the && long integers to get all the decimal digits I need. :-)