Integrated Application Platform › Forums › General › Writing a file with hex values › Reply To: Writing a file with hex values
August 6, 2017 at 11:59 am
#1317
Participant
I don’t think there is an existing function to display hex value string
so we need something like the following code
n = 0x0D06
map = ‘0123456789ABCD’
s = ”
while (n >= 1)
{
c = n % 16
s = map[c] $ s
n = (n – c) / 16
}
s.LeftFill(4, ‘0’)
we probably could add to Numbers as well
f.Write(0x0D06) converts the hex number to decimal number automatically, the future version of cSuneido will not convert automatically anymore, and will throw error instead.