fromHex
This function is used by Ignition's Expression language.
Descriptionβ
Returns an integer value of the hex formatted string argument. Numbers outside of the range (-231) - (231-1), and strings that are not hex numbers, return null.
Syntaxβ
fromHex(string)
Parametersβ
| Type | Parameter | Description |
|---|---|---|
| String | string | A string representation of a hex value. |
Resultsβ
Integer - The integer of the hex value.
Examplesβ
Code Snippet
fromHex("ff") //returns 255
Code Snippet
fromHex("0xff") //returns 255
Code Snippet
fromHex("-ff") //returns -255