Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Decimal to Hex?
#1
Anybody know the command to convert decimal into hex?

For example 10 into 0x0A
#2
int i=10
out "%i 0x%X" i i
#3
ssimop Wrote:int i=10
out "%i 0x%X" i i

But how do you add it to a string?

int i=10
str text
text = "%i 0x%X" i i

//Error in "Macro /35"oMacro: missing ( after function name, or ; after statement.
#4
Function Function2
Code:
Copy      Help
int i=10
str text
text.format("%i 0x%X" i i)
out text
#5
How do you go from Hex to decimal??
#6
str decimal=0xff
out decimal

or

str hex="0xff"
int decimal=val(hex)

More examples

str hex.decrypt(8 "ff 70 1e 4b") ;;easiest way to fill str with binary data specified as hex bytes
outb hex hex.len
for(_i 0 hex.len) out hex[_i]

and

str s="ABCD"
s.encrypt(8 s "" 1)
out s


Forum Jump:


Users browsing this thread: 2 Guest(s)