rosskettles
Technical User
Just a small problem in a program I'm doing. I need to write to a file in Hex. I have two integer values, which I want to write in the format; 0x[var1][var2] e.g 0xFF or 0xF1 et cetera.
The code I have tried so far is:
set var1 [format %x $count]
puts $out "var1"
set var2 [format %x $latest]
puts $out "var2"
unfortunately, $count is a variable of a variable! any suggestions?
(to get some context, i'm writing a program to convert .raw image files to .rle)
The code I have tried so far is:
set var1 [format %x $count]
puts $out "var1"
set var2 [format %x $latest]
puts $out "var2"
unfortunately, $count is a variable of a variable! any suggestions?
(to get some context, i'm writing a program to convert .raw image files to .rle)