i want to know how can i convert a string to value (hex-decimal)
for example: i read a number in a xml file (this is the xml part: <width="20">)
i read 20 with getdstring, but how can i convert to decimal? (decimal, i mean \x14)
and how can i convert a decimal to string for output to file? (convert \x14 to 20 for output file)
converting values to string in quickbms
-
- Site Admin
- Posts: 12984
- Joined: Wed Jul 30, 2014 9:32 pm
Re: converting values to string in quickbms
Strings and numbers are quite abstract in quickbms.
Your variable can be already used as a number but if you want to be 100% sure try the following:
math VAR = VAR
or
set VAR long VAR # not suggested as far as I remember
Your variable can be already used as a number but if you want to be 100% sure try the following:
math VAR = VAR
or
set VAR long VAR # not suggested as far as I remember
-
- Site Admin
- Posts: 12984
- Joined: Wed Jul 30, 2014 9:32 pm
Re: converting values to string in quickbms
When working with output filenames I suggest to use the Printf operator of String:
string NAME p "%d" VAR
string NAME p "%d" VAR