Convert a decimal number to hexadecimal.
Beginning with Origin 2019, worksheets and matrices support display of hexadecimal numbers.
string Dec2Hex(int n[,places])$
n
Return the hexadecimal string equivalent of the specified decimal value. Optionally, specify the number of characters in the hexadecimal string equivalent and if that number of characters exceeds the number needed to express the value, pad with zero (0).
dec2Hex(-28)$ = ; // FFFFFFE4 string strHex; int n = 12; strHex$ = dec2Hex(n)$; strHex$ = ; // C
bb=305402130; // numeric value str1$="0x"; str2$=Dec2Hex(bb,16)$; // store numeric as string & pad as needed to 16 characters hex$=str1$+str2$; hex$=; // returns hex value 0x0000000012341112 as string