cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
tech_is
Level 5

Convert Decimal to Hex..... URGENT

Hi,
I need to convert some decimal values to hexadecimal values at runtime, so is there any inbuilt function in installscript?
I
f the answer is no, then is there any other solution to this problem?:confused:


Please help. URGENT
Thanks in advance 🙂
Labels (1)
0 Kudos
(5) Replies
RobertDickau
Flexera Alumni

(Follow-up [post=424046]here[/post].)
0 Kudos
MGarrett
Level 6

InstallScript does not have a builtin hexadecimal data type. All numbers are expressed in decimal form.

In order to convert a number to hex, you will have to store it in a string. You can use the Sprintf() function to convert the decimal number to a hex string.

NUMBER numDecimal; // decimal version of the number
STRING strHex; //string where you want to save the hex version of the number

Sprintf(strHex, "%lX", numDecimal);
0 Kudos
tech_is
Level 5

Thanks a lot MGarrett, I'll try for the same and will revert back if I face any probs.
Thanks again.:)
0 Kudos
Not applicable

Note that you can also use 'StrToNumHex' and 'NumToStr' functions to do the conversion.

Devin Ellingson
Software Developer
Acresso Software
0 Kudos
tech_is
Level 5

Thanks a lot 🙂
0 Kudos